This example shows how to use a dialog event handler to turn on/off widget visibilities.
The example dialog was designed to contain a simple text label symbolizing the main content. Below, you find a "More" section consisting of a title, toggle button and a second text label. The second label's visibility is changed (toggled) by the button.
def dialog_event_handler (widget):
# [...]
if widget == DIALOG.button:
DIALOG.label_bottom.visible = not DIALOG.label_bottom.visible
- How-to: User-defined Dialogs