fsleyes_props.widgets_boolean
¶
This module provides the _Boolean()
function, which is imported into
the widgets
module namespace. It is separated purely to keep the
widgets
module file size down.
-
fsleyes_props.widgets_boolean.
_Boolean
(parent, hasProps, propObj, propVal, icon=None, toggle=True, style=None, **kwargs)¶ Creates and returns a
wx.CheckBox
, allowing the user to set the givenBoolean
property value.Parameters: - icon –
If the
icon
argument is provided, it should be a string containing the name of an image file, or a list of two image file names. In this case, case, a :class:.BitmapToggleButton` is used instead of aCheckBox
.Note
If
toggle
isFalse
,icons
may alternately be a sequence of four icons, with the order[selectedTrueIcon, unselectedTrueIcon, selectedFalseIcon, unselectedFalseIcon]
. - toggle – If two icon images are provided, and the
toggle
argument isTrue
(the default), aBitmapToggleButton
is used. Iftoggle=False
, aBitmapRadioBox
is used instead. In the latter case, thestyle
argument is passed through to theBitmapRadioBox.__init__()
method. - style – If
toggle
isFalse
, this value is passed through to theBitmapRadioBox.__init__()
method.
See the
widgets._String()
documentation for details on the other parameters.- icon –
-
fsleyes_props.widgets_boolean.
_booleanCheckBox
(parent)¶ Create a
wx.CheckBox
to link to theBoolean
property.