Last active
December 18, 2016 15:38
-
-
Save feoh/a01b8f33d1fecb078fd3e8f9888ede3f to your computer and use it in GitHub Desktop.
My first attempt at a Toga app
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import toga | |
def build(app): | |
"""Blah""" | |
def button_handler(widget): | |
"""Blah """ | |
entries.insert(None, entry.value) | |
box = toga.Box() | |
entries = toga.Table(["Entries"]) | |
entry = toga.TextInput() | |
button = toga.Button('Add Entry', on_press=button_handler) | |
button.style.set(margin=50) | |
box.add(entries) | |
box.add(entry) | |
box.add(button) | |
return box | |
if __name__ == '__main__': | |
app = toga.App('First App', 'org.pybee.qual', startup=build) | |
app.main_loop() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment