Created
July 4, 2017 21:31
-
-
Save Dayof/ca7b6320f21fdd9e84ae07b812edb676 to your computer and use it in GitHub Desktop.
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 | |
from colosseum import CSS | |
class StartApp(toga.App): | |
def startup(self): | |
self.main_window = toga.MainWindow(self.name) | |
self.main_window.app = self | |
main_content = toga.Box() | |
single_input = toga.Box(style=CSS(flex_direction='row', margin=10)) | |
m_label = toga.Label('Single Text Input: ') | |
m_input = toga.TextInput(initial='') | |
single_input.add(m_label) | |
single_input.add(m_input) | |
multiple_input = toga.Box(style=CSS(flex_direction='row', margin=10)) | |
m_label = toga.Label('Multiple Text Input: ') | |
m_input = toga.MultilineTextInput(initial='') | |
multiple_input.add(m_label) | |
multiple_input.add(m_input) | |
main_content.add(single_input) | |
main_content.add(multiple_input) | |
self.main_window.content = main_content | |
self.main_window.show() | |
def main(): | |
app = StartApp('MultilineTextInput Test', 'org.pybee.test') | |
app.main_loop() | |
if __name__ == '__main__': | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment