Button¶
- class tanmatsu.widgets.Button(*args, label: str = 'Button', callback: Optional[Callable[[...], NoReturn]], **kwargs)¶
Bases:
BoxA button widget. Calls the callback when activated.
- Parameters
label (str) – The text to show on the button.
callback (Callable[..., NoReturn]) – The function the button should call when activated.
- property label: str¶
- Getter
Gets the button’s label, i.e., the text to show on the button.
- Setter
Sets the button’s label.
- property callback: Callable[[...], NoReturn]¶
- Getter
Gets the button’s callback function, i.e., the function called when the button is activated.
- Setter
Sets the button’s callback function.