App.button
- App.button(text, parent=None)[source]
Decorator for button actions.
- Parameters
- textstr
The button text label.
- Returns
- callable
Notes
Use this method to convert a function into the callback action of a button, and automatically add the button to the sidebar.
Examples
@viewer.button('Click me!') def click(app): app.info('Thanks for clicking...')