MainWindow#
A window for displaying components to the user
Usage#
A MainWindow is used for desktop applications, where components need to be shown within a window-manager. Windows can be configured on instantiation and support displaying multiple widgets, toolbars and resizing.
import toga
window = toga.MainWindow('id-window', title='This is a window!')
window.show()
Reference#
- class toga.app.MainWindow(id=None, title=None, position=(100, 100), size=(640, 480), toolbar=None, resizeable=True, minimizable=True, factory=None, on_close=None)#
- property on_close#
The handler to invoke before the window is closed.
- Returns:
The function
callable
that is called before the window is closed.