.. wxPython Phoenix documentation

   This file was generated by Phoenix's sphinx generator and associated
   tools, do not edit by hand.

   Copyright: (c) 2011-2017 by Total Control Software
   License:   wxWindows License

.. include:: headings.inc



.. _wx.GenericMessageDialog.ButtonLabel:

==========================================================================================================================================
|phoenix_title|  **wx.GenericMessageDialog.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:`~wx.GenericMessageDialog.ButtonLabel.SetYesNoLabels`  and :meth:`~wx.GenericMessageDialog.ButtonLabel.SetOKCancelLabels`  below to be callable with either stock ids (e.g. ``ID_CLOSE``) or strings ("&Close").           




|

|class_hierarchy| Class Hierarchy
=================================

.. raw:: html

   <div id="toggleBlock" onclick="return toggleVisibility(this)" class="closed" style="cursor:pointer;">
   <img id="toggleBlock-trigger" src="_static/images/closed.png"/>
   Inheritance diagram for class <strong>ButtonLabel</strong>:
   </div>
   <div id="toggleBlock-summary" style="display:block;"></div>
   <div id="toggleBlock-content" style="display:none;">
   <p class="graphviz">
   <center><img src="_static/images/inheritance/wx.GenericMessageDialog.ButtonLabel_inheritance.png" alt="Inheritance diagram of ButtonLabel" usemap="#dummy" class="inheritance"/></center>
   </div>
   <script type="text/javascript">toggleVisibilityOnLoad(document.getElementById('toggleBlock'))</script>
   <map id="dummy" name="dummy"> <area shape="rect" id="node1" href="wx.GenericMessageDialog.ButtonLabel.html" title="Helper class allowing to use either stock id or string labels." alt="" coords="5,5,275,35"/> </map> 
   </p>

|


|method_summary| Methods Summary
================================

================================================================================ ================================================================================
:meth:`~wx.GenericMessageDialog.ButtonLabel.__init__`                            Construct the label from a stock id.
:meth:`~wx.GenericMessageDialog.ButtonLabel.GetAsString`                         Return the associated label as string.
:meth:`~wx.GenericMessageDialog.ButtonLabel.GetStockId`                          Return the stock id or ``wx.ID_NONE`` if this is not a stock label.
================================================================================ ================================================================================


|


|property_summary| Properties Summary
=====================================

================================================================================ ================================================================================
:attr:`~wx.GenericMessageDialog.ButtonLabel.AsString`                            See :meth:`~wx.GenericMessageDialog.ButtonLabel.GetAsString`
:attr:`~wx.GenericMessageDialog.ButtonLabel.StockId`                             See :meth:`~wx.GenericMessageDialog.ButtonLabel.GetStockId`
================================================================================ ================================================================================


|


|api| Class API
===============


.. class:: wx.GenericMessageDialog.ButtonLabel(object)

   **Possible constructors**::

       ButtonLabel(stockId)
       
       ButtonLabel(label)
       
   
   Helper class allowing to use either stock id or string labels.



   .. 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                  

      :rtype: `string`








   .. method:: GetStockId(self)

      Return the stock id or ``wx.ID_NONE`` if this is not a stock label.                  

      :rtype: `int`








   .. attribute:: AsString

      See :meth:`~wx.GenericMessageDialog.ButtonLabel.GetAsString`


   .. attribute:: StockId

      See :meth:`~wx.GenericMessageDialog.ButtonLabel.GetStockId`

