fsleyes_widgets.bitmaptoggle
¶
This module provides the BitmapToggleButton
class, a button
which toggles between two bitmaps.
-
class
fsleyes_widgets.bitmaptoggle.
BitmapToggleButton
(parent, *args, **kwargs)¶ Bases:
wx._core.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.-
SetBitmap
(bitmap, dir=LEFT)¶ Sets the bitmap to display in the button.
-
SetValue
(state)¶ Sets the current boolean state of this
BitmapToggleButton
.
-
fsleyes_widgets.bitmaptoggle.
EVT_BITMAP_TOGGLE
= <wx.core.PyEventBinder object>¶ Identifier for the
BitmapToggleEvent
event.
-
fsleyes_widgets.bitmaptoggle.
BitmapToggleEvent
¶ alias of
wx.lib.newevent.NewEvent.<locals>._Event