fsleyes_widgets.bitmapradio
¶
This module provides the BitmapRadioBox
class, a radio control
which uses bitmap toggle buttons.
- class fsleyes_widgets.bitmapradio.BitmapRadioBox(parent, style=None)[source]¶
Bases:
wx._core.Panel
A radio control which displays a collection of
wx.ToggleButton
controls, each of which displays an image.Each of these buttons corresponds to a mutually exclusive option - when the user clicks on a button, it is toggled on, and all of the others are toggled off.
For example, here is a
BitmapRadioBox
which allows the user to switch between view mode and edit mode:When the user pushes a button, a
EVT_BITMAP_RADIO_EVENT
is generated.Create a
BitmapRadioBox
.- Parameters
parent – A parent window.
style – A combination of
BMPRADIO_ALLOW_DESELECTED
, and one ofwx.HORIZONTAL
(the default) orwx.VERTICAL
, to control the button layout direction
- property buttons¶
Returns a list containing the
BitmapToggleButton
instances. Used for testing.
- AddChoice(selectedBmp, unselectedBmp=None, clientData=None)[source]¶
Add a button to this
BitmapRadioBox
.- Parameters
selectedBmp – A
wx.Bitmap
to display on the button when it is selected.unselectedBmp – Optional. A
wx.Bitmap
to display on the button when it is not selected.clientData – Arbitrary data which is associated with the choice.
- fsleyes_widgets.bitmapradio.BMPRADIO_ALLOW_DESELECTED = 1¶
Style flag which allows all buttons to be de-selected. If not specified (the default), one button must always be selected.
- fsleyes_widgets.bitmapradio.EVT_BITMAP_RADIO_EVENT = <wx.core.PyEventBinder object>¶
Identifier for the
BitmapRadioEvent
.
- fsleyes_widgets.bitmapradio.BitmapRadioEvent¶
alias of
wx.lib.newevent.NewEvent.<locals>._Event