import _core
wx = _core
-__docfilter__ = wx.__docfilter__
#---------------------------------------------------------------------------
BU_LEFT = _controls_.BU_LEFT
A button is a control that contains a text string, and is one of the most
common elements of a GUI. It may be placed on a dialog box or panel, or
indeed almost any other window.
+
+ Window Styles
+ -------------
+ ============== ==========================================
+ wx.BU_LEFT Left-justifies the label. WIN32 only.
+ wx.BU_TOP Aligns the label to the top of the button.
+ WIN32 only.
+ wx.BU_RIGHT Right-justifies the bitmap label. WIN32 only.
+ wx.BU_BOTTOM Aligns the label to the bottom of the button.
+ WIN32 only.
+ wx.BU_EXACTFIT Creates the button as small as possible
+ instead of making it of the standard size
+ (which is the default behaviour.)
+ ============== ==========================================
+
+ Events
+ ------
+ ============ ==========================================
+ EVT_BUTTON Sent when the button is clicked.
+ ============ ==========================================
+
+ :see: `wx.BitmapButton`
+
"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxButton instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
return _controls_.Button_SetDefault(*args, **kwargs)
def GetDefaultSize(*args, **kwargs):
- """Button.GetDefaultSize() -> Size"""
+ """
+ GetDefaultSize() -> Size
+
+ Returns the default button size for this platform.
+ """
return _controls_.Button_GetDefaultSize(*args, **kwargs)
GetDefaultSize = staticmethod(GetDefaultSize)
return val
def Button_GetDefaultSize(*args, **kwargs):
- """Button_GetDefaultSize() -> Size"""
+ """
+ Button_GetDefaultSize() -> Size
+
+ Returns the default button size for this platform.
+ """
return _controls_.Button_GetDefaultSize(*args, **kwargs)
class BitmapButton(Button):
"""
A Button that contains a bitmap. A bitmap button can be supplied with a
- single bitmap, and wxWindows will draw all button states using this bitmap. If
+ single bitmap, and wxWidgets will draw all button states using this bitmap. If
the application needs more control, additional bitmaps for the selected state,
unpressed focused state, and greyed-out state may be supplied.
+ Window Styles
+ -------------
+ ============== =============================================
+ wx.BU_AUTODRAW If this is specified, the button will be drawn
+ automatically using the label bitmap only,
+ providing a 3D-look border. If this style is
+ not specified, the button will be drawn
+ without borders and using all provided
+ bitmaps. WIN32 only.
+ wx.BU_LEFT Left-justifies the label. WIN32 only.
+ wx.BU_TOP Aligns the label to the top of the button. WIN32
+ only.
+ wx.BU_RIGHT Right-justifies the bitmap label. WIN32 only.
+ wx.BU_BOTTOM Aligns the label to the bottom of the
+ button. WIN32 only.
+ wx.BU_EXACTFIT Creates the button as small as possible
+ instead of making it of the standard size
+ (which is the default behaviour.)
+ ============== =============================================
+
+ Events
+ ------
+ =========== ==================================
+ EVT_BUTTON Sent when the button is clicked.
+ =========== ==================================
+
+ :see: `wx.Button`, `wx.Bitmap`
+
"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxBitmapButton instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
CHK_UNDETERMINED = _controls_.CHK_UNDETERMINED
class CheckBox(_core.Control):
"""
- A checkbox is a labelled box which by default is either on (checkmark is
- visible) or off (no checkmark). Optionally (When the wxCHK_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.
+ 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.
+
+ Window Styles
+ -------------
+ ================================= ===============================
+ 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.
+ ================================= ===============================
+
+ Events
+ ------
+ =============================== ===============================
+ EVT_CHECKBOX Sent when checkbox is clicked.
+ =============================== ===============================
+
"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxCheckBox instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
"""
IsChecked(self) -> bool
- Similar to GetValue, but raises an exception if it is not a 2-state CheckBox.
+ Similar to GetValue, but raises an exception if it is not a 2-state
+ CheckBox.
"""
return _controls_.CheckBox_IsChecked(*args, **kwargs)
"""
SetValue(self, bool state)
- Set the state of a 2-state CheckBox. Pass True for checked,
- False for unchecked.
+ Set the state of a 2-state CheckBox. Pass True for checked, False for
+ unchecked.
"""
return _controls_.CheckBox_SetValue(*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.
+ 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.
"""
return _controls_.CheckBox_Get3StateValue(*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
- (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.
+ 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.
"""
return _controls_.CheckBox_Set3StateValue(*args, **kwargs)
"""
Is3rdStateAllowedForUser(self) -> bool
- Returns whether or not the user can set the CheckBox to the third state.
+ Returns whether or not the user can set the CheckBox to the third
+ state.
"""
return _controls_.CheckBox_Is3rdStateAllowedForUser(*args, **kwargs)
class Choice(_core.ControlWithItems):
"""
- A Choice control is used to select one of a list of strings. Unlike a ListBox,
- only the selection is visible until the user pulls down the menu of choices.
+ A Choice control is used to select one of a list of strings.
+ Unlike a `wx.ListBox`, only the selection is visible until the
+ user pulls down the menu of choices.
+
+ Events
+ ------
+ ================ ==========================================
+ EVT_CHOICE Sent when an item in the list is selected.
+ ================ ==========================================
+
"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxChoice instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def SetStringSelection(*args, **kwargs):
"""
- SetStringSelection(self, String string)
+ SetStringSelection(self, String string) -> bool
Select the item with the specifed string
"""
"""
SetSelection(self, int n)
- Selects the text between the two positions, in the combobox text field.
+ Sets the item at index 'n' to be the selected item.
"""
return _controls_.ComboBox_SetSelection(*args, **kwargs)
def SetMark(*args, **kwargs):
- """SetMark(self, long from, long to)"""
+ """
+ SetMark(self, long from, long to)
+
+ Selects the text between the two positions in the combobox text field.
+ """
return _controls_.ComboBox_SetMark(*args, **kwargs)
+ def SetStringSelection(*args, **kwargs):
+ """
+ SetStringSelection(self, String string) -> bool
+
+ Select the item with the specifed string
+ """
+ return _controls_.ComboBox_SetStringSelection(*args, **kwargs)
+
+ def SetString(*args, **kwargs):
+ """
+ SetString(self, int n, String string)
+
+ Set the label for the n'th item (zero based) in the list.
+ """
+ return _controls_.ComboBox_SetString(*args, **kwargs)
+
def SetEditable(*args, **kwargs):
"""SetEditable(self, bool editable)"""
return _controls_.ComboBox_SetEditable(*args, **kwargs)
return _controls_.StaticLine_IsVertical(*args, **kwargs)
def GetDefaultSize(*args, **kwargs):
- """StaticLine.GetDefaultSize() -> int"""
+ """GetDefaultSize() -> int"""
return _controls_.StaticLine_GetDefaultSize(*args, **kwargs)
GetDefaultSize = staticmethod(GetDefaultSize)
def GetClassDefaultAttributes(*args, **kwargs):
"""
- ListBox.GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
+ 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
return _controls_.TextAttr_IsDefault(*args, **kwargs)
def Combine(*args, **kwargs):
- """TextAttr.Combine(TextAttr attr, TextAttr attrDef, TextCtrl text) -> TextAttr"""
+ """Combine(TextAttr attr, TextAttr attrDef, TextCtrl text) -> TextAttr"""
return _controls_.TextAttr_Combine(*args, **kwargs)
Combine = staticmethod(Combine)
def GetClassDefaultAttributes(*args, **kwargs):
"""
- ListCtrl.GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
+ 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
def GetClassDefaultAttributes(*args, **kwargs):
"""
- TreeCtrl.GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
+ 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
return "<%s.%s; proxy of C++ wxHelpProvider instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def Set(*args, **kwargs):
"""
- HelpProvider.Set(HelpProvider helpProvider) -> HelpProvider
+ Set(HelpProvider helpProvider) -> HelpProvider
Sset the current, application-wide help provider. Returns the
previous one. Unlike some other classes, the help provider is
Set = staticmethod(Set)
def Get(*args, **kwargs):
"""
- HelpProvider.Get() -> HelpProvider
+ Get() -> HelpProvider
Return the current application-wide help provider.
"""