revitron.ui.button¶
A basic button module that integrates well into Revitron windows.
Classes:
|
A simple Ok/Cancel button to be used in Revitron windows. |
- class Button(*args: Any, **kwargs: Any)[source]¶
Bases:
Button
A simple Ok/Cancel button to be used in Revitron windows.
Methods:
OnClick
()The OnClick handler function.
__init__
(text, window[, cancel])Initialize a new Button instance.
create
(window, containerName, text[, cancel])A helper to easily create a new button instance
- __init__(text, window, cancel=False, **kwargs)[source]¶
Initialize a new Button instance.
- Parameters
text (string) – The button label text
window (object) – The parent window object
cancel (bool, optional) – If true, the window is closed without returning data. Defaults to False.
- static create(window, containerName, text, cancel=True)[source]¶
A helper to easily create a new button instance
- Parameters
window (object) – The parent window object
containerName (string) – The name of the parent container
text (strict) – The button label text
cancel (bool, optional) – The cancel option for the button. Defaults to True.