Skip to content

Commit

Permalink
Added the demo app changes to the working branch.
Browse files Browse the repository at this point in the history
  • Loading branch information
proneon267 committed May 13, 2023
1 parent ad9b8cd commit 4784eac
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion examples/window/window/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,15 @@ def startup(self):
screen_change_btns_box = toga.Box(
children=[toga.Label(text="Move current window to:")]
)

def do_screen_change(screen):
self.current_window.screen = screen

for screen in self.screens:
screen_change_btns_box.add(
toga.Button(
text=screen.name,
on_press=lambda x: setattr(self.current_window, "screen", screen),
on_press=lambda x, screen=screen: do_screen_change(screen),
)
)
self.main_box = toga.Box(
Expand Down

0 comments on commit 4784eac

Please sign in to comment.