Skip to content

Instantly share code, notes, and snippets.

@Dayof
Created June 7, 2017 01:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Dayof/f25e73a902b3c1d0c2b83dc6e3fba8f9 to your computer and use it in GitHub Desktop.
Save Dayof/f25e73a902b3c1d0c2b83dc6e3fba8f9 to your computer and use it in GitHub Desktop.
import toga
class StartApp(toga.App):
def startup(self):
self.main_window = toga.MainWindow(self.name)
self.main_window.app = self
right_box = toga.Box()
left_box = toga.Box()
test_status_font = toga.Font(family='Helvetica', size=50)
test_status = toga.Label('Font test')
test_status.set_font(test_status_font)
# test_status.rehint()
right_box.add(test_status)
split_main_container = toga.SplitContainer()
split_main_container.content = [left_box, right_box]
self.main_window.content = split_main_container
self.main_window.show()
def main():
app = StartApp('Font 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