Guest User

Untitled

a guest
Mar 18th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. import toga
  2. from toga.constants import MONOSPACE, SMALL_CAPS
  3. from toga.style import Pack
  4.  
  5.  
  6. def build(app):
  7. box = toga.Box()
  8. label = toga.Label('Hello world', style=Pack(font_variant=SMALL_CAPS)) # Replacing with font_family=monospace or font_size=20 works
  9. label.style.padding = 100
  10. label.style.flex = 1
  11. box.add(label)
  12.  
  13. return box
  14.  
  15.  
  16. def main():
  17. return toga.App('First App', 'org.pybee.helloworld', startup=build)
  18.  
  19.  
  20. if __name__ == '__main__':
  21. main().main_loop()
Add Comment
Please, Sign In to add comment