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

==========================================================================================================================================
|phoenix_title|  **wx.BitmapToggleButton**
==========================================================================================================================================

:ref:`wx.BitmapToggleButton`  is a :ref:`wx.ToggleButton`  that contains a bitmap instead of text.          

This class is not available in all ports currently (although it is available in the major ones), test for  ``HAS_BITMAPTOGGLEBUTTON``   to determine whether it can be used (in addition for possibly testing for   ``USE_TOGGLEBTN``   which can be set to 0 to explicitly disable support for this class and  :ref:`wx.ToggleButton`). 

This control emits an update UI event. 







.. _BitmapToggleButton-events:

|events| Events Emitted by this Class
=====================================

Handlers bound for the following event types will receive a :ref:`wx.CommandEvent` parameter.


- EVT_TOGGLEBUTTON: Handles a wxEVT_TOGGLEBUTTON event.  










|

|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>BitmapToggleButton</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.BitmapToggleButton_inheritance.png" alt="Inheritance diagram of BitmapToggleButton" 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.BitmapToggleButton.html" title="wx.BitmapToggleButton" alt="" coords="28,469,199,499"/> <area shape="rect" id="node2" href="wx.ToggleButton.html" title="wx.ToggleButton" alt="" coords="51,392,176,421"/> <area shape="rect" id="node3" href="wx.Control.html" title="wx.Control" alt="" coords="69,237,157,267"/> <area shape="rect" id="node8" href="wx.AnyButton.html" title="wx.AnyButton" alt="" coords="59,315,168,344"/> <area shape="rect" id="node4" href="wx.Window.html" title="wx.Window" alt="" coords="69,160,157,189"/> <area shape="rect" id="node5" href="wx.Trackable.html" title="wx.Trackable" alt="" coords="5,5,107,35"/> <area shape="rect" id="node7" href="wx.EvtHandler.html" title="wx.EvtHandler" alt="" coords="57,83,168,112"/> <area shape="rect" id="node6" href="wx.Object.html" title="wx.Object" alt="" coords="131,5,212,35"/> </map> 
   </p>

|


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

================================================================================ ================================================================================
:meth:`~wx.BitmapToggleButton.__init__`                                          Default constructor.
:meth:`~wx.BitmapToggleButton.Create`                                            Create method for two-step construction.
:meth:`~wx.BitmapToggleButton.GetValue`                                          Gets the state of the toggle button.
:meth:`~wx.BitmapToggleButton.SetValue`                                          Sets the toggle button to the given state.
================================================================================ ================================================================================


|


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

================================================================================ ================================================================================
:attr:`~wx.BitmapToggleButton.Value`                                             See :meth:`~wx.BitmapToggleButton.GetValue` and :meth:`~wx.BitmapToggleButton.SetValue`
================================================================================ ================================================================================


|


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


.. class:: wx.BitmapToggleButton(ToggleButton)

   **Possible constructors**::

       BitmapToggleButton()
       
       BitmapToggleButton(parent, id=ID_ANY, label=NullBitmap,
                          pos=DefaultPosition, size=DefaultSize, style=0, val=DefaultValidator,
                          name=CheckBoxNameStr)
       
   
   BitmapToggleButton is a ToggleButton that contains a bitmap
   instead of text.



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



      |overload| Overloaded Implementations:

      **~~~**

      
      **__init__** `(self)`
      
      Default constructor.                   
      
      
      
      
      **~~~**

      
      **__init__** `(self, parent, id=ID_ANY, label=NullBitmap, pos=DefaultPosition, size=DefaultSize, style=0, val=DefaultValidator, name=CheckBoxNameStr)`
      
      Constructor, creating and showing a toggle button with the bitmap `label`.                  
      
      Internally calls :meth:`Create` .                  
      
      
      :param `parent`: 
      :type `parent`: wx.Window
      :param `id`: 
      :type `id`: wx.WindowID
      :param `label`: 
      :type `label`: wx.Bitmap
      :param `pos`: 
      :type `pos`: wx.Point
      :param `size`: 
      :type `size`: wx.Size
      :param `style`: 
      :type `style`: long
      :param `val`: 
      :type `val`: wx.Validator
      :param `name`: 
      :type `name`: string
      
      
      
      
      
      
      **~~~**






   .. method:: Create(self, parent, id=ID_ANY, label=NullBitmap, pos=DefaultPosition, size=DefaultSize, style=0, val=DefaultValidator, name=CheckBoxNameStr)

      Create method for two-step construction.                  


      :param `parent`: 
      :type `parent`: wx.Window
      :param `id`: 
      :type `id`: wx.WindowID
      :param `label`: 
      :type `label`: wx.Bitmap
      :param `pos`: 
      :type `pos`: wx.Point
      :param `size`: 
      :type `size`: wx.Size
      :param `style`: 
      :type `style`: long
      :param `val`: 
      :type `val`: wx.Validator
      :param `name`: 
      :type `name`: string




      :rtype: `bool`








   .. method:: GetValue(self)

      Gets the state of the toggle button.                  

                

      :rtype: `bool`







      :returns: 

         Returns ``True`` if it is pressed, ``False`` otherwise.   








   .. method:: SetValue(self, state)

      Sets the toggle button to the given state.                  

      This does not cause a  ``EVT_TOGGLEBUTTON``   event to be emitted. 




      :param `state`: If ``True``, the button is pressed.   
      :type `state`: bool




                  





   .. attribute:: Value

      See :meth:`~wx.BitmapToggleButton.GetValue` and :meth:`~wx.BitmapToggleButton.SetValue`

