.. include:: headings.inc .. _ButtonLabel: ========================================================================================================================================== |phoenix_title| **ButtonLabel** ========================================================================================================================================== 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 :meth:`~ButtonLabel.SetYesNoLabels` and :meth:`~ButtonLabel.SetOKCancelLabels` below to be callable with either stock ids (e.g. ``ID_CLOSE``) or strings ("Close"). | |class_hierarchy| Inheritance Diagram ===================================== Inheritance diagram for class **ButtonLabel** .. raw:: html

Inheritance diagram of ButtonLabel

| |method_summary| Methods Summary ================================ ================================================================================ ================================================================================ :meth:`~ButtonLabel.__init__` Construct the label from a stock id. :meth:`~ButtonLabel.GetAsString` Return the associated label as string. :meth:`~ButtonLabel.GetStockId` Return the stock id or ``ID_NONE`` if this is not a stock label. ================================================================================ ================================================================================ | |property_summary| Properties Summary ===================================== ================================================================================ ================================================================================ :attr:`~ButtonLabel.AsString` See :meth:`~ButtonLabel.GetAsString` :attr:`~ButtonLabel.StockId` See :meth:`~ButtonLabel.GetStockId` ================================================================================ ================================================================================ | |api| Class API =============== .. class:: ButtonLabel(object) Helper class allowing to use either stock id or string labels. **Possible constructors**:: ButtonLabel(stockId) ButtonLabel(label) .. method:: __init__(self, *args, **kw) |overload| **Overloaded Implementations**: **~~~** **__init__** `(self, stockId)` Construct the label from a stock id. :param `stockId`: :type `stockId`: int **~~~** **__init__** `(self, label)` Construct the label from the specified string. :param `label`: :type `label`: string **~~~** .. method:: GetAsString(self) Return the associated label as string. Get the string label, whether it was originally specified directly or as a stock id -- this is only useful for platforms without native stock items id support :rtype: `string` .. method:: GetStockId(self) Return the stock id or ``ID_NONE`` if this is not a stock label. :rtype: `int` .. attribute:: AsString See :meth:`~ButtonLabel.GetAsString` .. attribute:: StockId See :meth:`~ButtonLabel.GetStockId`