fsleyes_widgets.bitmaptoggle
This module provides the BitmapToggleButton
class, a button
which toggles between two bitmaps.
- class fsleyes_widgets.bitmaptoggle.BitmapToggleButton(parent, *args, **kwargs)[source]
Bases:
ToggleButton
A
wx.ToggleButton
which stores a boolean state (True
/False
), and displays one of two bitmaps depending on the state.When the user presses the button, the boolean state and the displayed bitmap changes accordingly. A
EVT_BITMAP_TOGGLE
event is generated on button presses.Create a
BitmapToggleButton
.- Parameters:
parent – The
wx
parent window.trueBmp – Required. A
wx.Bitmap
to display when the button state isTrue
.falseBmp – Optional. A
wx.Bitmap
to display when the button state isFalse
.
All other arguemnts are passed through to the
wx.ToggleButton.__init__
method.
- fsleyes_widgets.bitmaptoggle.EVT_BITMAP_TOGGLE = <wx.core.PyEventBinder object>
Identifier for the
BitmapToggleEvent
event.
- fsleyes_widgets.bitmaptoggle.BitmapToggleEvent
Event emitted when a
BitmapToggleButton
is pushed.Contains one attribute,
value
, which contains the current button state (True
orFalse
).