Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Button title text wrap
-
Can a ui.button have text that wraps many lines? I can only get it to be one line...
-
little known fact: buttons are views, and can have subviews.
use a Label, as a subview of a button. see for example:# coding: utf-8 import ui,faker f=faker.Faker() v=ui.View(frame=(0,0,576,576)) b=ui.Button(frame=(100,200,200,100),bg_color='#ffede7') lbl=ui.Label(frame=(0,0,200,100),name='button_label') lbl.number_of_lines=0 lbl.alignment=ui.ALIGN_CENTER def a(sender): sender['button_label'].text=f.sentence() b.action=a b.add_subview(lbl) v.add_subview(b) v.present('sheet')
-
Ooooh. Now that's interesting....