Control¶
- class pyto_ui.Control¶
The base class for controls, which are visual elements that convey a specific action or intention in response to user interactions.
Inherited by
Button,SegmentedControl,Slider,SwitchandTextField- property action: callable¶
A function called when the control triggers its action. For example, a
Buttonobject calls this function when it’s pressed.Takes the
Controlobject as parameter.- Return type:
callable
- property enabled: bool¶
A boolean indicating whether the control is enabled.
- Return type:
bool
- property horizontal_alignment: HorizontalAlignment¶
The horizontal alignment of the view’s contents. See
Horizontal Alignmentconstants for possible values.- Return type:
Horizontal Alignment
- property vertical_alignment: VerticalAlignment¶
The vertical alignment of the view’s contents. See
Vertical Alignemntconstants for possible values.- Return type:
Vertical Alignment