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

==========================================================================================================================================
|phoenix_title|  **wx.ToolBarToolBase**
==========================================================================================================================================

A toolbar tool represents one item on the toolbar.          

It has a unique id (except for the separators), the style (telling whether it is a normal button, separator or a control), the state (toggled or not, enabled or not) and short and long help strings. The default implementations use the short help string for the tooltip text which is popped up when the mouse pointer enters the tool and the long help string for the applications status bar.           




|

|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>ToolBarToolBase</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.ToolBarToolBase_inheritance.png" alt="Inheritance diagram of ToolBarToolBase" 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.Object.html" title="This is the root class of many of the wxWidgets classes." alt="" coords="38,5,121,35"/> <area shape="rect" id="node2" href="wx.ToolBarToolBase.html" title="A toolbar tool represents one item on the toolbar." alt="" coords="5,83,153,112"/> </map> 
   </p>

|


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

================================================================================ ================================================================================
:meth:`~wx.ToolBarToolBase.__init__`                                             
:meth:`~wx.ToolBarToolBase.Attach`                                               
:meth:`~wx.ToolBarToolBase.CanBeToggled`                                         
:meth:`~wx.ToolBarToolBase.Detach`                                               
:meth:`~wx.ToolBarToolBase.Enable`                                               
:meth:`~wx.ToolBarToolBase.GetBitmap`                                            
:meth:`~wx.ToolBarToolBase.GetClientData`                                        
:meth:`~wx.ToolBarToolBase.GetControl`                                           
:meth:`~wx.ToolBarToolBase.GetDisabledBitmap`                                    
:meth:`~wx.ToolBarToolBase.GetDropdownMenu`                                      
:meth:`~wx.ToolBarToolBase.GetId`                                                
:meth:`~wx.ToolBarToolBase.GetKind`                                              
:meth:`~wx.ToolBarToolBase.GetLabel`                                             
:meth:`~wx.ToolBarToolBase.GetLongHelp`                                          
:meth:`~wx.ToolBarToolBase.GetNormalBitmap`                                      
:meth:`~wx.ToolBarToolBase.GetShortHelp`                                         
:meth:`~wx.ToolBarToolBase.GetStyle`                                             
:meth:`~wx.ToolBarToolBase.GetToolBar`                                           Return the toolbar this tool is a member of.
:meth:`~wx.ToolBarToolBase.IsButton`                                             
:meth:`~wx.ToolBarToolBase.IsControl`                                            
:meth:`~wx.ToolBarToolBase.IsEnabled`                                            
:meth:`~wx.ToolBarToolBase.IsSeparator`                                          
:meth:`~wx.ToolBarToolBase.IsStretchable`                                        
:meth:`~wx.ToolBarToolBase.IsStretchableSpace`                                   
:meth:`~wx.ToolBarToolBase.IsToggled`                                            
:meth:`~wx.ToolBarToolBase.MakeStretchable`                                      
:meth:`~wx.ToolBarToolBase.SetClientData`                                        
:meth:`~wx.ToolBarToolBase.SetDisabledBitmap`                                    
:meth:`~wx.ToolBarToolBase.SetDropdownMenu`                                      
:meth:`~wx.ToolBarToolBase.SetLabel`                                             
:meth:`~wx.ToolBarToolBase.SetLongHelp`                                          
:meth:`~wx.ToolBarToolBase.SetNormalBitmap`                                      
:meth:`~wx.ToolBarToolBase.SetShortHelp`                                         
:meth:`~wx.ToolBarToolBase.SetToggle`                                            
:meth:`~wx.ToolBarToolBase.Toggle`                                               
================================================================================ ================================================================================


|


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

================================================================================ ================================================================================
:attr:`~wx.ToolBarToolBase.Bitmap`                                               See :meth:`~wx.ToolBarToolBase.GetBitmap`
:attr:`~wx.ToolBarToolBase.ClientData`                                           See :meth:`~wx.ToolBarToolBase.GetClientData` and :meth:`~wx.ToolBarToolBase.SetClientData`
:attr:`~wx.ToolBarToolBase.Control`                                              See :meth:`~wx.ToolBarToolBase.GetControl`
:attr:`~wx.ToolBarToolBase.DisabledBitmap`                                       See :meth:`~wx.ToolBarToolBase.GetDisabledBitmap` and :meth:`~wx.ToolBarToolBase.SetDisabledBitmap`
:attr:`~wx.ToolBarToolBase.DropdownMenu`                                         See :meth:`~wx.ToolBarToolBase.GetDropdownMenu` and :meth:`~wx.ToolBarToolBase.SetDropdownMenu`
:attr:`~wx.ToolBarToolBase.Id`                                                   See :meth:`~wx.ToolBarToolBase.GetId`
:attr:`~wx.ToolBarToolBase.Kind`                                                 See :meth:`~wx.ToolBarToolBase.GetKind`
:attr:`~wx.ToolBarToolBase.Label`                                                See :meth:`~wx.ToolBarToolBase.GetLabel` and :meth:`~wx.ToolBarToolBase.SetLabel`
:attr:`~wx.ToolBarToolBase.LongHelp`                                             See :meth:`~wx.ToolBarToolBase.GetLongHelp` and :meth:`~wx.ToolBarToolBase.SetLongHelp`
:attr:`~wx.ToolBarToolBase.NormalBitmap`                                         See :meth:`~wx.ToolBarToolBase.GetNormalBitmap` and :meth:`~wx.ToolBarToolBase.SetNormalBitmap`
:attr:`~wx.ToolBarToolBase.ShortHelp`                                            See :meth:`~wx.ToolBarToolBase.GetShortHelp` and :meth:`~wx.ToolBarToolBase.SetShortHelp`
:attr:`~wx.ToolBarToolBase.Style`                                                See :meth:`~wx.ToolBarToolBase.GetStyle`
:attr:`~wx.ToolBarToolBase.ToolBar`                                              See :meth:`~wx.ToolBarToolBase.GetToolBar`
================================================================================ ================================================================================


|


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


.. class:: wx.ToolBarToolBase(Object)

   **Possible constructors**::

       ToolBarToolBase(tbar=None, toolid=ID_SEPARATOR, label="",
                       bmpNormal=NullBitmap, bmpDisabled=NullBitmap, kind=ITEM_NORMAL,
                       clientData=None, shortHelpString="",
                       longHelpString="")
       
       ToolBarToolBase(tbar, control, label)
       
   
   A toolbar tool represents one item on the toolbar.



   .. method:: __init__(self, *args, **kw)



      |overload| Overloaded Implementations:

      **~~~**

      
      **__init__** `(self, tbar=None, toolid=ID_SEPARATOR, label="", bmpNormal=NullBitmap, bmpDisabled=NullBitmap, kind=ITEM_NORMAL, clientData=None, shortHelpString="", longHelpString="")`
      
      
      
      
      :param `tbar`: 
      :type `tbar`: wx.ToolBar
      :param `toolid`: 
      :type `toolid`: int
      :param `label`: 
      :type `label`: string
      :param `bmpNormal`: 
      :type `bmpNormal`: wx.Bitmap
      :param `bmpDisabled`: 
      :type `bmpDisabled`: wx.Bitmap
      :param `kind`: 
      :type `kind`: wx.ItemKind
      :param `clientData`: 
      :type `clientData`: PyUserData
      :param `shortHelpString`: 
      :type `shortHelpString`: string
      :param `longHelpString`: 
      :type `longHelpString`: string
      
      
      
      
      
      
      **~~~**

      
      **__init__** `(self, tbar, control, label)`
      
      
      
      
      :param `tbar`: 
      :type `tbar`: wx.ToolBar
      :param `control`: 
      :type `control`: wx.Control
      :param `label`: 
      :type `label`: string
      
      
      
      
      
      
      **~~~**






   .. method:: Attach(self, tbar)




      :param `tbar`: 
      :type `tbar`: wx.ToolBar







   .. method:: CanBeToggled(self)



      :rtype: `bool`








   .. method:: Detach(self)






   .. method:: Enable(self, enable)




      :param `enable`: 
      :type `enable`: bool




      :rtype: `bool`








   .. method:: GetBitmap(self)



      :rtype: :ref:`wx.Bitmap`








   .. method:: GetClientData(self)



      :rtype: `PyUserData`     








   .. method:: GetControl(self)



      :rtype: :ref:`wx.Control`








   .. method:: GetDisabledBitmap(self)



      :rtype: :ref:`wx.Bitmap`








   .. method:: GetDropdownMenu(self)



      :rtype: :ref:`wx.Menu`








   .. method:: GetId(self)



      :rtype: `int`








   .. method:: GetKind(self)



      :rtype: :ref:`wx.ItemKind`








   .. method:: GetLabel(self)



      :rtype: `string`








   .. method:: GetLongHelp(self)



      :rtype: `string`








   .. method:: GetNormalBitmap(self)



      :rtype: :ref:`wx.Bitmap`








   .. method:: GetShortHelp(self)



      :rtype: `string`








   .. method:: GetStyle(self)



      :rtype: `int`








   .. method:: GetToolBar(self)

      Return the toolbar this tool is a member of. 

      :rtype: :ref:`wx.ToolBar`








   .. method:: IsButton(self)



      :rtype: `bool`








   .. method:: IsControl(self)



      :rtype: `bool`








   .. method:: IsEnabled(self)



      :rtype: `bool`








   .. method:: IsSeparator(self)



      :rtype: `bool`








   .. method:: IsStretchable(self)



      :rtype: `bool`








   .. method:: IsStretchableSpace(self)



      :rtype: `bool`








   .. method:: IsToggled(self)



      :rtype: `bool`








   .. method:: MakeStretchable(self)






   .. method:: SetClientData(self, clientData)




      :param `clientData`: 
      :type `clientData`: PyUserData







   .. method:: SetDisabledBitmap(self, bmp)




      :param `bmp`: 
      :type `bmp`: wx.Bitmap







   .. method:: SetDropdownMenu(self, menu)




      :param `menu`: 
      :type `menu`: wx.Menu







   .. method:: SetLabel(self, label)




      :param `label`: 
      :type `label`: string







   .. method:: SetLongHelp(self, help)




      :param `help`: 
      :type `help`: string




      :rtype: `bool`








   .. method:: SetNormalBitmap(self, bmp)




      :param `bmp`: 
      :type `bmp`: wx.Bitmap







   .. method:: SetShortHelp(self, help)




      :param `help`: 
      :type `help`: string




      :rtype: `bool`








   .. method:: SetToggle(self, toggle)




      :param `toggle`: 
      :type `toggle`: bool




      :rtype: `bool`








   .. method:: Toggle(self, *args, **kw)



      |overload| Overloaded Implementations:

      **~~~**

      
      **Toggle** `(self, toggle)`
      
      
      
      
      :param `toggle`: 
      :type `toggle`: bool
      
      
      
      
      :rtype: `bool`
      
      
      
      
      
      
      
      **~~~**

      
      **Toggle** `(self)`
      
      
      
      
      
      **~~~**






   .. attribute:: Bitmap

      See :meth:`~wx.ToolBarToolBase.GetBitmap`


   .. attribute:: ClientData

      See :meth:`~wx.ToolBarToolBase.GetClientData` and :meth:`~wx.ToolBarToolBase.SetClientData`


   .. attribute:: Control

      See :meth:`~wx.ToolBarToolBase.GetControl`


   .. attribute:: DisabledBitmap

      See :meth:`~wx.ToolBarToolBase.GetDisabledBitmap` and :meth:`~wx.ToolBarToolBase.SetDisabledBitmap`


   .. attribute:: DropdownMenu

      See :meth:`~wx.ToolBarToolBase.GetDropdownMenu` and :meth:`~wx.ToolBarToolBase.SetDropdownMenu`


   .. attribute:: Id

      See :meth:`~wx.ToolBarToolBase.GetId`


   .. attribute:: Kind

      See :meth:`~wx.ToolBarToolBase.GetKind`


   .. attribute:: Label

      See :meth:`~wx.ToolBarToolBase.GetLabel` and :meth:`~wx.ToolBarToolBase.SetLabel`


   .. attribute:: LongHelp

      See :meth:`~wx.ToolBarToolBase.GetLongHelp` and :meth:`~wx.ToolBarToolBase.SetLongHelp`


   .. attribute:: NormalBitmap

      See :meth:`~wx.ToolBarToolBase.GetNormalBitmap` and :meth:`~wx.ToolBarToolBase.SetNormalBitmap`


   .. attribute:: ShortHelp

      See :meth:`~wx.ToolBarToolBase.GetShortHelp` and :meth:`~wx.ToolBarToolBase.SetShortHelp`


   .. attribute:: Style

      See :meth:`~wx.ToolBarToolBase.GetStyle`


   .. attribute:: ToolBar

      See :meth:`~wx.ToolBarToolBase.GetToolBar`