wx._controls.CheckBox
A checkbox is a labelled box which by default is either on (the
checkmark is visible) or off (no checkmark). Optionally (When the
wx.CHK_3STATE style flag is set) it can have a third state, called the
mixed or undetermined state. Often this is used as a "Does Not
Apply" state.
Create(args, kwargs)
Create(self, Window parent, int id=-1, String label=EmptyString,
Point pos=DefaultPosition, Size size=DefaultSize,
long style=0, Validator validator=DefaultValidator,
String name=CheckBoxNameStr) -> bool
Actually create the GUI CheckBox for 2-phase creation.
Get3StateValue(args, kwargs)
Get3StateValue(self) -> int
Returns wx.CHK_UNCHECKED when the CheckBox is unchecked,
wx.CHK_CHECKED when it is checked and wx.CHK_UNDETERMINED when it's in
the undetermined state. Raises an exceptiion when the function is
used with a 2-state CheckBox.
GetClassDefaultAttributes
GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
Get the default attributes for this class. This is useful if you want
to use the same font or colour in your own control as in a standard
control -- which is a much better idea than hard coding specific
colours or fonts which might look completely out of place on the
user's system, especially if it uses themes.
The variant parameter is only relevant under Mac currently and is
ignore under other platforms. Under Mac, it will change the size of
the returned font. See `wx.Window.SetWindowVariant` for more about
this.
GetValue(args, kwargs)
GetValue(self) -> bool
Gets the state of a 2-state CheckBox. Returns True if it is checked,
False otherwise.
Is3State(args, kwargs)
Is3State(self) -> bool
Returns whether or not the CheckBox is a 3-state CheckBox.
Is3rdStateAllowedForUser(args, kwargs)
Is3rdStateAllowedForUser(self) -> bool
Returns whether or not the user can set the CheckBox to the third
state.
IsChecked(args, kwargs)
IsChecked(self) -> bool
Similar to GetValue, but raises an exception if it is not a 2-state
CheckBox.
Set3StateValue(args, kwargs)
Set3StateValue(self, int state)
Sets the CheckBox to the given state. The state parameter can be one
of the following: wx.CHK_UNCHECKED (Check is off), wx.CHK_CHECKED (the
Check is on) or wx.CHK_UNDETERMINED (Check is mixed). Raises an
exception when the CheckBox is a 2-state checkbox and setting the
state to wx.CHK_UNDETERMINED.
SetValue(args, kwargs)
SetValue(self, bool state)
Set the state of a 2-state CheckBox. Pass True for checked, False for
unchecked.
[constructor]
Usage: classname(arguments)
[member '__doc__']
Documentation for this class
[member '__module__']
The module that this class belongs to
[operator 'repr']
Usage: repr(a)