GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||
GeezerVison is showing docs.wxpython.org — wx.ToggleButton — wxPython 4.3.2 Docs
|
Default constructor. |
|
Creates the toggle button for two-step construction. |
|
Gets the state of the toggle button. |
|
Sets the toggle button to the given state. |
Properties Summary¶
Class API¶Possible constructors:
ToggleButton() -> None ToggleButton(parent, id=ID_ANY, label='', pos=DefaultPosition, size=DefaultSize, style=0, val=DefaultValidator, name=CheckBoxNameStr) -> None
ToggleButton is a button that stays pressed when clicked by the user.
__init__ (self)
Default constructor.
None
__init__ (self, parent, id=ID_ANY, label=’’, pos=DefaultPosition, size=DefaultSize, style=0, val=DefaultValidator, name=CheckBoxNameStr)
Constructor, creating and showing a toggle button.
parent (wx.Window) – Parent window. Must not be nullptr.
id (wx.WindowID) – Toggle button identifier. The value wx.ID_ANY indicates a default value.
label (string) – Text to be displayed next to the toggle button.
pos (wx.Point) – Toggle button position. If wx.DefaultPosition is specified then a default position is chosen.
size (wx.Size) – Toggle button size. If wx.DefaultSize is specified then a default size is chosen.
style (long) – Window style. See wx.ToggleButton.
val (wx.Validator) – Window validator.
name (string) – Window name.
None
See also
Creates the toggle button for two-step construction.
See wx.ToggleButton for details.
parent (wx.Window)
id (wx.WindowID)
label (string)
pos (wx.Point)
size (wx.Size)
style (long)
val (wx.Validator)
name (string)
bool
variant (WindowVariant)
Gets the state of the toggle button.
bool
Returns True if it is pressed, False otherwise.
Sets the toggle button to the given state.
This does not cause a EVT_TOGGLEBUTTON event to be emitted.
state (bool) – If True, the button is pressed.
None