BitmapToggleButton is a ToggleButton that contains a bitmap instead of text.
This class is not available in all ports currently (although it is available in the major ones), test for HAS_BITMAPTOGGLEBUTTON to determine whether it can be used (in addition for possibly testing for USE_TOGGLEBTN which can be set to 0 to explicitly disable support for this class and ToggleButton).
This control emits an update UI event.
Handlers bound for the following event types will receive a CommandEvent parameter.
__init__ | Default constructor. |
Create | Create method for two-step construction. |
GetValue | Gets the state of the toggle button. |
SetValue | Sets the toggle button to the given state. |
BitmapToggleButton is a ToggleButton that contains a bitmap instead of text.
Possible constructors:
BitmapToggleButton()
BitmapToggleButton(parent, id=ID_ANY, label=NullBitmap,
pos=DefaultPosition, size=DefaultSize, style=0, val=DefaultValidator,
name=CheckBoxNameStr)
Overloaded Implementations:
__init__ (self)
Default constructor.
__init__ (self, parent, id=ID_ANY, label=NullBitmap, pos=DefaultPosition, size=DefaultSize, style=0, val=DefaultValidator, name=CheckBoxNameStr)
Constructor, creating and showing a toggle button with the bitmap label.
Internally calls Create .
Parameters: |
---|
Create method for two-step construction.
Parameters: | |
---|---|
Return type: | bool |
Gets the state of the toggle button.
Return type: | bool |
---|---|
Returns: | 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.
Parameters: | state (bool) – If True, the button is pressed. |
---|