pdwidgets.widgets.toggle

Icon toggle base class.

class pdwidgets.widgets.toggle.Toggle(parent, x=0, y=0, w=None, h=None, align=None, align_to=None, fg=None, bg=None, visible=True, value=False, padding=None, on_file=None, off_file=None)[source]

Bases: IconButton

Icon button that toggles between on and off states.

toggle(data=None, event=None)[source]

Toggle the on/off state of the button.

changed()[source]

Update the icon based on the current on/off state.