Skip to main content

Button Class

Package: GHIElectronics.Endpoint.UI
Namespace: GHIElectronics.Endpoint.UI

Clickable push button with text, color, and font-size properties.

class Button(Widget): ...

Constructors​

Button(Widget parent)​

def __init__(self, parent: Widget):

Create a button inside parent.

ParameterTypeDescription
parentWidgetContaining widget.

Properties​

BackgroundColor​

BackgroundColor: int # @property / @setter

Button background color as 0x00RRGGBB. Getter returns the last value set.

Returns uint

FontSize​

FontSize: int # @property / @setter

Caption font size in pixels. Getter returns the last value set.

Returns int

Text​

Text: str # @property / @setter

Button caption. null is treated as empty. Getter returns the last value set.

Returns string

TextColor​

TextColor: int # @property / @setter

Caption color as 0x00RRGGBB. Getter returns the last value set.

Returns uint

Events​

Clicked​

Clicked # += / -= handler

Fires when the button is clicked (press-and-release inside its bounds). Runs on the UI thread.