Skip to main content

Switch Class

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

Binary on/off toggle. ValueChanged fires on each flip.

class Switch(Widget): ...

Constructors​

Switch(Widget parent)​

def __init__(self, parent: Widget):

Create a switch inside parent.

ParameterTypeDescription
parentWidgetContaining widget.

Properties​

IsChecked​

IsChecked: bool # @property / @setter

On/off state. Read-back is supported by LVGL.

Returns bool

Events​

ValueChanged​

ValueChanged # += / -= handler

Fires on every flip of Switch.IsChecked from user interaction. Runs on the UI thread.