Created
July 27, 2017 07:24
-
-
Save Dayof/ad86b0d01c9f0e266c3684d2995af0ed to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
self.input_box = toga.Box() | |
multiple_input = toga.Box(style=CSS(flex_direction='row', margin=10)) | |
m_label = toga.Label('Multiple Text Input: ') | |
self.m_input = toga.MultilineTextInput('WHATSUP', | |
readonly=True, | |
placeholder='SURPRISE') | |
multiple_input.add(m_label) | |
multiple_input.add(self.m_input) | |
self.input_box.add(multiple_input) | |
self.control_box = toga.Box() | |
update_tree_button = toga.Button('Update Tree', | |
on_press=self.callbackUpdate) | |
self.control_box.add(update_tree_button) | |
frame = toga.SplitContainer() | |
frame.content = [self.input_box, self.control_box] | |
self.main_window.content = frame | |
self.main_window.show() | |
def callbackUpdate(self, event): | |
self.m_input.clear() | |
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