Helper class allowing to use either stock id or string labels.
This class should never be used explicitly and is not really part of wxWidgets API but rather is just an implementation helper allowing the methods such as SetYesNoLabels
and SetOKCancelLabels
below to be callable with either stock ids (e.g. ID_CLOSE
) or strings (“&Close”).
__init__ |
Construct the label from a stock id. |
GetAsString |
Return the associated label as string. |
GetStockId |
Return the stock id or wx.ID_NONE if this is not a stock label. |
wx.GenericMessageDialog.
ButtonLabel
(object)¶Possible constructors:
ButtonLabel(stockId)
ButtonLabel(label)
Helper class allowing to use either stock id or string labels.
__init__
(self, *args, **kw)¶__init__ (self, stockId)
Construct the label from a stock id.
Parameters: | stockId (int) – |
---|
__init__ (self, label)
Construct the label from the specified string.
Parameters: | label (string) – |
---|
GetAsString
(self)¶Return the associated label as string.
Get the string label, whether it was originally specified directly or as a stock id
Return type: | string |
---|
GetStockId
(self)¶Return the stock id or wx.ID_NONE
if this is not a stock label.
Return type: | int |
---|
AsString
¶See GetAsString
StockId
¶See GetStockId