Home | Trees | Index | Help |
|
---|
Package wx :: Class CheckBox |
|
object
--+ |Object
--+ |EvtHandler
--+ |Window
--+ |Control
--+ | 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.
wx.CHK_2STATE Create a 2-state checkbox. This is the default. wx.CHK_3STATE Create a 3-state checkbox. wx.CHK_ALLOW_3RD_STATE_FOR_USER By default a user can't set a 3-state checkbox to the third state. It can only be done from code. Using this flags allows the user to set the checkbox to the third state by clicking. wx.ALIGN_RIGHT Makes the text appear on the left of the checkbox.
EVT_CHECKBOX Sent when checkbox is clicked.
Method Summary | |
---|---|
CheckBox |
Creates and shows a CheckBox control |
bool |
Actually create the GUI CheckBox for 2-phase creation. |
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. |
VisualAttributes |
Get the default attributes for this class. (Static method) |
bool |
Gets the state of a 2-state CheckBox. |
bool |
Returns whether or not the user can set the CheckBox to the third state. |
bool |
Returns whether or not the CheckBox is a 3-state CheckBox. |
bool |
Similar to GetValue, but raises an exception if it is not a 2-state CheckBox. |
Sets the CheckBox to the given state. | |
Set the state of a 2-state CheckBox. |
Property Summary | |
---|---|
thisown : The membership flag | |
ThreeStateValue : See Get3StateValue and Set3StateValue | |
Value : See GetValue and SetValue |
Instance Method Details |
---|
__init__(self,
parent,
id=-1,
label=EmptyString,
pos=DefaultPosition,
size=DefaultSize,
style=0,
validator=DefaultValidator,
name=CheckBoxNameStr)
|
Create(self, parent, id=-1, label=EmptyString, pos=DefaultPosition, size=DefaultSize, style=0, validator=DefaultValidator, name=CheckBoxNameStr)Actually create the GUI CheckBox for 2-phase creation.
|
Get3StateValue(self)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.
|
GetValue(self)Gets the state of a 2-state CheckBox. Returns True if it is checked, False otherwise.
|
Is3rdStateAllowedForUser(self)Returns whether or not the user can set the CheckBox to the third state.
|
Is3State(self)Returns whether or not the CheckBox is a 3-state CheckBox.
|
IsChecked(self)Similar to GetValue, but raises an exception if it is not a 2-state CheckBox.
|
Set3StateValue(self, 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(self, state)Set the state of a 2-state CheckBox. Pass True for checked, False for unchecked.
|
Static Method Details |
---|
GetClassDefaultAttributes(variant=WINDOW_VARIANT_NORMAL)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
|
Property Details |
---|
thisownThe membership flag |
ThreeStateValueSee
|
Value |
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1.20050511.rpd on Thu Mar 22 12:11:49 2007 | http://epydoc.sf.net |