Widget Documentation

Widget class

Base Class

This is a base class and should not be instantiated directly.

Widget methods

Widget.enable()

Use this to enable the widget.

Return type:

NoneType

Widget.disable()

Use this to disable the widget.

Return type:

NoneType

Widget properties

property Widget.size

Get or set the vertical size factor of the widget (int or float).

This is a base class property that is useful in some widgets and it is limited by the constants below. The height in pixels of the widget is calculated by multiplicating size to the pygameyagui.constants.WIDGET_STANDARD_SLOT_HEIGHT.

The size factor will be internally limited (min and max values) by SIZE_FACTOR constants of each widget. Refer to the constants listing of each widget to get the values.

property Widget.enabled

Get or set the enabled state (bool).

Widget constants

constants.WIDGET_STANDARD_SLOT_HEIGHT = 40