.. wxPython Phoenix documentation

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

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

.. include:: headings.inc

.. currentmodule:: wx.lib.agw.shapedbutton

.. highlight:: python



.. _wx.lib.agw.shapedbutton.SBitmapTextButton:

==========================================================================================================================================
|phoenix_title|  **wx.lib.agw.shapedbutton.SBitmapTextButton**
==========================================================================================================================================

Subclass of :class:`SButton` which displays a bitmap and a label.



|

|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>SBitmapTextButton</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.lib.agw.shapedbutton.SBitmapTextButton_inheritance.png" alt="Inheritance diagram of SBitmapTextButton" usemap="#dummy" class="inheritance"/></center>
   <script type="text/javascript">toggleVisibilityOnLoad(document.getElementById('toggleBlock'))</script>
   <map id="dummy" name="dummy"> <area shape="rect" id="node1" href="wx.lib.agw.shapedbutton.SBitmapTextButton.html" title="Subclass of SButton which displays a bitmap and a label." alt="" coords="5,469,329,499"/> <area shape="rect" id="node2" href="wx.lib.agw.shapedbutton.SBitmapButton.html" title="Subclass of SButton which displays a bitmap, acting like a" alt="" coords="20,392,315,421"/> <area shape="rect" id="node3" href="wx.lib.agw.shapedbutton.SButton.html" title="This is the main implementation of `ShapedButton`." alt="" coords="44,315,291,344"/> <area shape="rect" id="node4" href="wx.Window.html" title="wx.Window  is the base class for all windows and represents any visible object on screen." alt="" coords="119,237,216,267"/> <area shape="rect" id="node5" href="wx.WindowBase.html" title="wx.WindowBase" alt="" coords="102,160,233,189"/> <area shape="rect" id="node6" href="wx.EvtHandler.html" title="A class that can handle events from the windowing system." alt="" coords="108,83,227,112"/> <area shape="rect" id="node7" href="wx.Object.html" title="This is the root class of many of the wxWidgets classes." alt="" coords="62,5,150,35"/> <area shape="rect" id="node8" href="wx.Trackable.html" title="Add-on base class for a trackable object." alt="" coords="175,5,285,35"/> </map> 
   </p>
   </div>

|


|appearance| Control Appearance
===============================

|

.. figure:: _static/images/widgets/fullsize/wxmsw/wx.lib.agw.shapedbutton.sbitmaptextbutton.png
   :alt: wxMSW
   :figclass: floatleft

   **wxMSW**


.. figure:: _static/images/widgets/fullsize/wxmac/../no_appearance.png
   :alt: wxMAC
   :figclass: floatright

   **wxMAC**


.. figure:: _static/images/widgets/fullsize/wxgtk/wx.lib.agw.shapedbutton.sbitmaptextbutton.png
   :alt: wxGTK
   :figclass: floatcenter

   **wxGTK**


|




|sub_classes| Known Subclasses
==============================

:class:`wx.lib.agw.shapedbutton.SBitmapTextToggleButton`

|


|super_classes| Known Superclasses
==================================

:class:`wx.lib.agw.shapedbutton.SBitmapButton`

|


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

================================================================================ ================================================================================
:meth:`~wx.lib.agw.shapedbutton.SBitmapTextButton.__init__`                      Default class constructor.
:meth:`~wx.lib.agw.shapedbutton.SBitmapTextButton.DrawLabel`                     Draws the bitmap and the text label.
================================================================================ ================================================================================


|


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


.. class:: SBitmapTextButton(SBitmapButton)

   Subclass of :class:`SButton` which displays a bitmap and a label.

   .. method:: __init__(self, parent, id, bitmap, label, pos=wx.DefaultPosition, size=wx.DefaultSize)

      Default class constructor.
      
      :param `parent`: the :class:`SBitmapTextButton` parent. Must not be ``None``;
      :param `id`: window identifier. A value of -1 indicates a default value;
      :param `bitmap`: the button bitmap (if any);
      :param `label`: the button text label;
      :param `pos`: the control position. A value of (-1, -1) indicates a default position,
       chosen by either the windowing system or wxPython, depending on platform;
      :param `size`: the control size. A value of (-1, -1) indicates a default size,
       chosen by either the windowing system or wxPython, depending on platform.


   .. method:: DrawLabel(self, dc, width, height, dw=0, dh=0)

      Draws the bitmap and the text label.
      
      :param `dc`: an instance of :class:`wx.DC`;
      :param `width`: the button width;
      :param `height`: the button height;
      :param `dw`: width differential, to show a 3D effect;
      :param `dh`: height differential, to show a 3D effect.