Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import toga
- from toga.constants import MONOSPACE, SMALL_CAPS
- from toga.style import Pack
- def build(app):
- box = toga.Box()
- label = toga.Label('Hello world', style=Pack(font_variant=SMALL_CAPS)) # Replacing with font_family=monospace or font_size=20 works
- label.style.padding = 100
- label.style.flex = 1
- box.add(label)
- return box
- def main():
- return toga.App('First App', 'org.pybee.helloworld', startup=build)
- if __name__ == '__main__':
- main().main_loop()
Add Comment
Please, Sign In to add comment