.. wxPython Phoenix documentation

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

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

.. include:: headings.inc



.. _wx.ribbon.RibbonButtonBar:

==========================================================================================================================================
|phoenix_title|  **wx.ribbon.RibbonButtonBar**
==========================================================================================================================================

A ribbon button bar is similar to a traditional toolbar.          

It contains one or more buttons (button bar buttons, not Buttons), each of which has a label and an icon. It differs from a :ref:`wx.ribbon.RibbonToolBar`  in several ways: 

- Individual buttons can grow and contract.  
- Buttons have labels as well as bitmaps.  
- Bitmaps are typically larger (at least 32x32 pixels) on a button bar compared to a tool bar (which typically has 16x15).  
- There is no grouping of buttons on a button bar  
- A button bar typically has a border around each individual button, whereas a tool bar typically has a border around each group of buttons. 








.. _RibbonButtonBar-events:

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

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


- EVT_RIBBONBUTTONBAR_CLICKED: Triggered when the normal (non-dropdown) region of a button on the button bar is clicked.  
- EVT_RIBBONBUTTONBAR_DROPDOWN_CLICKED: Triggered when the dropdown region of a button on the button bar is clicked. :meth:`wx.ribbon.RibbonButtonBarEvent.PopupMenu`   should be called by the event handler if it wants to display a popup menu (which is what most dropdown buttons should be doing).  










|

|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>RibbonButtonBar</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.ribbon.RibbonButtonBar_inheritance.png" alt="Inheritance diagram of RibbonButtonBar" 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.ribbon.RibbonButtonBar.html" title="wx.ribbon.RibbonButtonBar" alt="" coords="9,392,209,421"/> <area shape="rect" id="node2" href="wx.ribbon.RibbonControl.html" title="wx.ribbon.RibbonControl" alt="" coords="17,315,200,344"/> <area shape="rect" id="node3" href="wx.Control.html" title="wx.Control" alt="" coords="63,237,155,267"/> <area shape="rect" id="node4" href="wx.Window.html" title="wx.Window" alt="" coords="60,160,157,189"/> <area shape="rect" id="node5" href="wx.EvtHandler.html" title="wx.EvtHandler" alt="" coords="50,83,167,112"/> <area shape="rect" id="node6" href="wx.Object.html" title="wx.Object" alt="" coords="5,5,92,35"/> <area shape="rect" id="node7" href="wx.Trackable.html" title="wx.Trackable" alt="" coords="117,5,223,35"/> </map> 
   </p>
   </div>

|


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

================================================================================ ================================================================================
:meth:`~wx.ribbon.RibbonButtonBar.__init__`                                      Default constructor.
:meth:`~wx.ribbon.RibbonButtonBar.AddButton`                                     Add a button to the button bar (simple version).
:meth:`~wx.ribbon.RibbonButtonBar.AddDropdownButton`                             Add a dropdown button to the button bar (simple version).
:meth:`~wx.ribbon.RibbonButtonBar.AddHybridButton`                               Add a hybrid button to the button bar (simple version).
:meth:`~wx.ribbon.RibbonButtonBar.AddToggleButton`                               Add a toggle button to the button bar (simple version).
:meth:`~wx.ribbon.RibbonButtonBar.ClearButtons`                                  Delete all buttons from the button bar.
:meth:`~wx.ribbon.RibbonButtonBar.Create`                                        Create a button bar in two-step button bar construction.
:meth:`~wx.ribbon.RibbonButtonBar.DeleteButton`                                  Delete a single button from the button bar.
:meth:`~wx.ribbon.RibbonButtonBar.EnableButton`                                  Enable or disable a single button on the bar.
:meth:`~wx.ribbon.RibbonButtonBar.GetActiveItem`                                 Returns the active item of the button bar or ``None`` if there is none.
:meth:`~wx.ribbon.RibbonButtonBar.GetButtonCount`                                Returns the number of buttons in this button bar.
:meth:`~wx.ribbon.RibbonButtonBar.GetClassDefaultAttributes`                     
:meth:`~wx.ribbon.RibbonButtonBar.GetHoveredItem`                                Returns the hovered item of the button bar or ``None`` if there is none.
:meth:`~wx.ribbon.RibbonButtonBar.GetItem`                                       Returns the N-th button of the bar.
:meth:`~wx.ribbon.RibbonButtonBar.GetItemById`                                   Returns the first button having a given id or ``None`` if none matches.
:meth:`~wx.ribbon.RibbonButtonBar.GetItemClientData`                             Get the client object associated with a button.
:meth:`~wx.ribbon.RibbonButtonBar.GetItemId`                                     Returns the id of a button.
:meth:`~wx.ribbon.RibbonButtonBar.GetShowToolTipsForDisabled`                    Sets whether tooltips should be shown for disabled buttons or not.
:meth:`~wx.ribbon.RibbonButtonBar.InsertButton`                                  Inserts a button to the button bar (simple version) at the given position.
:meth:`~wx.ribbon.RibbonButtonBar.InsertDropdownButton`                          Inserts a dropdown button to the button bar (simple version) at the given position.
:meth:`~wx.ribbon.RibbonButtonBar.InsertHybridButton`                            Inserts a hybrid button to the button bar (simple version) at the given position.
:meth:`~wx.ribbon.RibbonButtonBar.InsertToggleButton`                            Inserts a toggle button to the button bar (simple version) at the given position.
:meth:`~wx.ribbon.RibbonButtonBar.Realize`                                       Calculate button layouts and positions.
:meth:`~wx.ribbon.RibbonButtonBar.SetButtonIcon`                                 Changes the bitmap of an existing button.
:meth:`~wx.ribbon.RibbonButtonBar.SetButtonMaxSizeClass`                         Sets the maximum size class of a ribbon button.
:meth:`~wx.ribbon.RibbonButtonBar.SetButtonMinSizeClass`                         Sets the minimum size class of a ribbon button.
:meth:`~wx.ribbon.RibbonButtonBar.SetButtonText`                                 Changes the label text of an existing button.
:meth:`~wx.ribbon.RibbonButtonBar.SetButtonTextMinWidth`                         Sets the minimum width of the button label, to indicate to the :ref:`wx.ribbon.RibbonArtProvider`  layout mechanism that this is the minimum required size.
:meth:`~wx.ribbon.RibbonButtonBar.SetItemClientData`                             Set the client object associated with a button.
:meth:`~wx.ribbon.RibbonButtonBar.SetShowToolTipsForDisabled`                    Indicates whether tooltips are shown for disabled buttons.
:meth:`~wx.ribbon.RibbonButtonBar.ToggleButton`                                  Set a toggle button to the checked or unchecked state.
================================================================================ ================================================================================


|


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

================================================================================ ================================================================================
:attr:`~wx.ribbon.RibbonButtonBar.ActiveItem`                                    See :meth:`~wx.ribbon.RibbonButtonBar.GetActiveItem`
:attr:`~wx.ribbon.RibbonButtonBar.ButtonCount`                                   See :meth:`~wx.ribbon.RibbonButtonBar.GetButtonCount`
:attr:`~wx.ribbon.RibbonButtonBar.HoveredItem`                                   See :meth:`~wx.ribbon.RibbonButtonBar.GetHoveredItem`
:attr:`~wx.ribbon.RibbonButtonBar.ShowToolTipsForDisabled`                       See :meth:`~wx.ribbon.RibbonButtonBar.GetShowToolTipsForDisabled` and :meth:`~wx.ribbon.RibbonButtonBar.SetShowToolTipsForDisabled`
================================================================================ ================================================================================


|


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


.. class:: wx.ribbon.RibbonButtonBar(RibbonControl)

   **Possible constructors**::

       RibbonButtonBar()
       
       RibbonButtonBar(parent, id=ID_ANY, pos=DefaultPosition,
                       size=DefaultSize, style=0)
       
   
   A ribbon button bar is similar to a traditional toolbar.



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



      |overload| Overloaded Implementations:

      :html:`<hr class="overloadsep" /><br />`

      
      **__init__** `(self)`
      
      Default constructor.                  
      
      With this constructor, :meth:`Create`   should be called in order to create the button bar.                   
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`

      
      **__init__** `(self, parent, id=ID_ANY, pos=DefaultPosition, size=DefaultSize, style=0)`
      
      Construct a ribbon button bar with the given parameters.                  
      
      
      
      
      :param `parent`: Parent window for the button bar (typically a :ref:`wx.ribbon.RibbonPanel`).   
      :type `parent`: wx.Window
      :param `id`: An identifier for the button bar.  ``ID_ANY``   is taken to mean a default.    
      :type `id`: wx.WindowID
      :param `pos`: Initial position of the button bar.   
      :type `pos`: wx.Point
      :param `size`: Initial size of the button bar.   
      :type `size`: wx.Size
      :param `style`: Button bar style, currently unused.   
      :type `style`: long
      
      
      
      
      
      
      
      
      
      
      
      
                        
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`






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



      |overload| Overloaded Implementations:

      :html:`<hr class="overloadsep" /><br />`

      
      **AddButton** `(self, button_id, label, bitmap, help_string, kind=RIBBON_BUTTON_NORMAL)`
      
      Add a button to the button bar (simple version).                  
      
      
      :param `button_id`: 
      :type `button_id`: int
      :param `label`: 
      :type `label`: string
      :param `bitmap`: 
      :type `bitmap`: wx.Bitmap
      :param `help_string`: 
      :type `help_string`: string
      :param `kind`: 
      :type `kind`: wx.ribbon.RibbonButtonKind
      
      
      
      
      :rtype: :ref:`RibbonButtonBarButtonBase`
      
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`

      
      **AddButton** `(self, button_id, label, bitmap, bitmap_small=NullBitmap, bitmap_disabled=NullBitmap, bitmap_small_disabled=NullBitmap, kind=RIBBON_BUTTON_NORMAL, help_string=EmptyString)`
      
      Add a button to the button bar.                  
      
      
      
      
      :param `button_id`: ``ID`` of the new button (used for event callbacks).   
      :type `button_id`: int
      :param `label`: Label of the new button.   
      :type `label`: string
      :param `bitmap`: Large bitmap of the new button. Must be the same size as all other large bitmaps used on the button bar.   
      :type `bitmap`: wx.Bitmap
      :param `bitmap_small`: Small bitmap of the new button. If left as null, then a small bitmap will be automatically generated. Must be the same size as all other small bitmaps used on the button bar.   
      :type `bitmap_small`: wx.Bitmap
      :param `bitmap_disabled`: Large bitmap of the new button when it is disabled. If left as null, then a bitmap will be automatically generated from  `bitmap`.   
      :type `bitmap_disabled`: wx.Bitmap
      :param `bitmap_small_disabled`: Small bitmap of the new button when it is disabled. If left as null, then a bitmap will be automatically generated from  `bitmap_small`.   
      :type `bitmap_small_disabled`: wx.Bitmap
      :param `kind`: The kind of button to add.   
      :type `kind`: wx.ribbon.RibbonButtonKind
      :param `help_string`: The UI help string to associate with the new button.  
      :type `help_string`: string
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      :rtype: :ref:`RibbonButtonBarButtonBase`
      
      
      
                        
      
      
      
      :returns: 
      
         An opaque pointer which can be used only with other button bar methods.  
      
      
      
      
      
      
      
      .. seealso:: :meth:`AddDropdownButton`     
      
      
      
      
      
      
      
      .. seealso:: :meth:`AddHybridButton`     
      
      
      
      
      
      
      
      .. seealso:: :meth:`AddToggleButton`     
      
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`






   .. method:: AddDropdownButton(self, button_id, label, bitmap, help_string=EmptyString)

      Add a dropdown button to the button bar (simple version).                  

                


      :param `button_id`: 
      :type `button_id`: int
      :param `label`: 
      :type `label`: string
      :param `bitmap`: 
      :type `bitmap`: wx.Bitmap
      :param `help_string`: 
      :type `help_string`: string




      :rtype: :ref:`RibbonButtonBarButtonBase`







      .. seealso:: :meth:`AddButton`     








   .. method:: AddHybridButton(self, button_id, label, bitmap, help_string=EmptyString)

      Add a hybrid button to the button bar (simple version).                  

                


      :param `button_id`: 
      :type `button_id`: int
      :param `label`: 
      :type `label`: string
      :param `bitmap`: 
      :type `bitmap`: wx.Bitmap
      :param `help_string`: 
      :type `help_string`: string




      :rtype: :ref:`RibbonButtonBarButtonBase`







      .. seealso:: :meth:`AddButton`     








   .. method:: AddToggleButton(self, button_id, label, bitmap, help_string=EmptyString)

      Add a toggle button to the button bar (simple version).                  

                


      :param `button_id`: 
      :type `button_id`: int
      :param `label`: 
      :type `label`: string
      :param `bitmap`: 
      :type `bitmap`: wx.Bitmap
      :param `help_string`: 
      :type `help_string`: string




      :rtype: :ref:`RibbonButtonBarButtonBase`







      .. seealso:: :meth:`AddButton`     








   .. method:: ClearButtons(self)

      Delete all buttons from the button bar.                  

                 



      .. seealso:: :meth:`DeleteButton`     








   .. method:: Create(self, parent, id=ID_ANY, pos=DefaultPosition, size=DefaultSize, style=0)

      Create a button bar in two-step button bar construction.                  

      Should only be called when the default constructor is used, and arguments have the same meaning as in the full constructor.                  


      :param `parent`: 
      :type `parent`: wx.Window
      :param `id`: 
      :type `id`: wx.WindowID
      :param `pos`: 
      :type `pos`: wx.Point
      :param `size`: 
      :type `size`: wx.Size
      :param `style`: 
      :type `style`: long




      :rtype: `bool`








   .. method:: DeleteButton(self, button_id)

      Delete a single button from the button bar.                  

      The corresponding button is deleted by this function, so any pointers to it previously obtained by :meth:`GetItem`   or :meth:`GetItemById`   become invalid. 

                


      :param `button_id`: 
      :type `button_id`: int




      :rtype: `bool`







      .. seealso:: :meth:`ClearButtons`     








   .. method:: EnableButton(self, button_id, enable=True)

      Enable or disable a single button on the bar.                  




      :param `button_id`: ``ID`` of the button to enable or disable.   
      :type `button_id`: int
      :param `enable`: ``True`` to enable the button, ``False`` to disable it.   
      :type `enable`: bool






                  





   .. method:: GetActiveItem(self)

      Returns the active item of the button bar or ``None`` if there is none.                  

      The active button is the one being clicked. 

                

      :rtype: :ref:`RibbonButtonBarButtonBase`







      .. versionadded:: 2.9.5 
     








   .. method:: GetButtonCount(self)

      Returns the number of buttons in this button bar.                  

                

      :rtype: `int`







      .. versionadded:: 2.9.4 
     








   .. staticmethod:: GetClassDefaultAttributes(variant=WINDOW_VARIANT_NORMAL)




      :param `variant`: 
      :type `variant`: wx.WindowVariant




      :rtype: :ref:`VisualAttributes`








   .. method:: GetHoveredItem(self)

      Returns the hovered item of the button bar or ``None`` if there is none.                  

      The hovered button is the one the mouse is over. 

                

      :rtype: :ref:`RibbonButtonBarButtonBase`







      .. versionadded:: 2.9.5 
     








   .. method:: GetItem(self, n)

      Returns the N-th button of the bar.                  

                


      :param `n`: 
      :type `n`: int




      :rtype: :ref:`RibbonButtonBarButtonBase`







      .. versionadded:: 2.9.5 
     







      .. seealso:: :meth:`GetButtonCount`   








   .. method:: GetItemById(self, id)

      Returns the first button having a given id or ``None`` if none matches.                  

                


      :param `id`: 
      :type `id`: int




      :rtype: :ref:`RibbonButtonBarButtonBase`







      .. versionadded:: 2.9.5 
     








   .. method:: GetItemClientData(self, item)

      Get the client object associated with a button.                  

                


      :param `item`: 
      :type `item`: RibbonButtonBarButtonBase




      :rtype: :ref:`ClientData`







      .. versionadded:: 2.9.5 
     








   .. method:: GetItemId(self, item)

      Returns the id of a button.                  

                


      :param `item`: 
      :type `item`: RibbonButtonBarButtonBase




      :rtype: `int`







      .. versionadded:: 2.9.5 
     








   .. method:: GetShowToolTipsForDisabled(self)

      Sets whether tooltips should be shown for disabled buttons or not.                  

      You may wish to show it to explain why a button is disabled or what it normally does when enabled. 

                

      :rtype: `bool`







      .. versionadded:: 2.9.5 
     








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



      |overload| Overloaded Implementations:

      :html:`<hr class="overloadsep" /><br />`

      
      **InsertButton** `(self, pos, button_id, label, bitmap, help_string, kind=RIBBON_BUTTON_NORMAL)`
      
      Inserts a button to the button bar (simple version) at the given position.                  
      
                      
      
      
      :param `pos`: 
      :type `pos`: int
      :param `button_id`: 
      :type `button_id`: int
      :param `label`: 
      :type `label`: string
      :param `bitmap`: 
      :type `bitmap`: wx.Bitmap
      :param `help_string`: 
      :type `help_string`: string
      :param `kind`: 
      :type `kind`: wx.ribbon.RibbonButtonKind
      
      
      
      
      :rtype: :ref:`RibbonButtonBarButtonBase`
      
      
      
      
      
      
      
      .. versionadded:: 2.9.4 
           
      
      
      
      
      
      
      
      .. seealso:: :meth:`AddButton`   
      
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`

      
      **InsertButton** `(self, pos, button_id, label, bitmap, bitmap_small=NullBitmap, bitmap_disabled=NullBitmap, bitmap_small_disabled=NullBitmap, kind=RIBBON_BUTTON_NORMAL, help_string=EmptyString)`
      
      Insert a button to the button bar at the given position.                  
      
      
      
      
      :param `pos`: Position of the new button in the button bar.   
      :type `pos`: int
      :param `button_id`: ``ID`` of the new button (used for event callbacks).   
      :type `button_id`: int
      :param `label`: Label of the new button.   
      :type `label`: string
      :param `bitmap`: Large bitmap of the new button. Must be the same size as all other large bitmaps used on the button bar.   
      :type `bitmap`: wx.Bitmap
      :param `bitmap_small`: Small bitmap of the new button. If left as null, then a small bitmap will be automatically generated. Must be the same size as all other small bitmaps used on the button bar.   
      :type `bitmap_small`: wx.Bitmap
      :param `bitmap_disabled`: Large bitmap of the new button when it is disabled. If left as null, then a bitmap will be automatically generated from  `bitmap`.   
      :type `bitmap_disabled`: wx.Bitmap
      :param `bitmap_small_disabled`: Small bitmap of the new button when it is disabled. If left as null, then a bitmap will be automatically generated from  `bitmap_small`.   
      :type `bitmap_small_disabled`: wx.Bitmap
      :param `kind`: The kind of button to add.   
      :type `kind`: wx.ribbon.RibbonButtonKind
      :param `help_string`: The UI help string to associate with the new button.  
      :type `help_string`: string
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      :rtype: :ref:`RibbonButtonBarButtonBase`
      
      
      
                        
      
      
      
      :returns: 
      
         An opaque pointer which can be used only with other button bar methods.  
      
      
      
      
      
      
      
      .. versionadded:: 2.9.4 
           
      
      
      
      
      
      
      
      .. seealso:: :meth:`InsertDropdownButton`     
      
      
      
      
      
      
      
      .. seealso:: :meth:`InsertHybridButton`     
      
      
      
      
      
      
      
      .. seealso:: :meth:`InsertToggleButton`     
      
      
      
      
      
      
      
      .. seealso:: :meth:`AddButton`   
      
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`






   .. method:: InsertDropdownButton(self, pos, button_id, label, bitmap, help_string=EmptyString)

      Inserts a dropdown button to the button bar (simple version) at the given position.                  

                


      :param `pos`: 
      :type `pos`: int
      :param `button_id`: 
      :type `button_id`: int
      :param `label`: 
      :type `label`: string
      :param `bitmap`: 
      :type `bitmap`: wx.Bitmap
      :param `help_string`: 
      :type `help_string`: string




      :rtype: :ref:`RibbonButtonBarButtonBase`







      .. versionadded:: 2.9.4 
     







      .. seealso:: :meth:`InsertButton`     







      .. seealso:: :meth:`AddDropdownButton`     







      .. seealso:: :meth:`AddButton`   








   .. method:: InsertHybridButton(self, pos, button_id, label, bitmap, help_string=EmptyString)

      Inserts a hybrid button to the button bar (simple version) at the given position.                  

                


      :param `pos`: 
      :type `pos`: int
      :param `button_id`: 
      :type `button_id`: int
      :param `label`: 
      :type `label`: string
      :param `bitmap`: 
      :type `bitmap`: wx.Bitmap
      :param `help_string`: 
      :type `help_string`: string




      :rtype: :ref:`RibbonButtonBarButtonBase`







      .. versionadded:: 2.9.4 
     







      .. seealso:: :meth:`InsertButton`     







      .. seealso:: :meth:`AddHybridButton`     







      .. seealso:: :meth:`AddButton`   








   .. method:: InsertToggleButton(self, pos, button_id, label, bitmap, help_string=EmptyString)

      Inserts a toggle button to the button bar (simple version) at the given position.                  

                


      :param `pos`: 
      :type `pos`: int
      :param `button_id`: 
      :type `button_id`: int
      :param `label`: 
      :type `label`: string
      :param `bitmap`: 
      :type `bitmap`: wx.Bitmap
      :param `help_string`: 
      :type `help_string`: string




      :rtype: :ref:`RibbonButtonBarButtonBase`







      .. versionadded:: 2.9.4 
     







      .. seealso:: :meth:`InsertButton`     







      .. seealso:: :meth:`AddToggleButton`     







      .. seealso:: :meth:`AddButton`   








   .. method:: Realize(self)

      Calculate button layouts and positions.                  

      Must be called after buttons are added to the button bar, as otherwise the newly added buttons will not be displayed. In normal situations, it will be called automatically when :meth:`wx.ribbon.RibbonBar.Realize`   is called.                  

      :rtype: `bool`








   .. method:: SetButtonIcon(self, button_id, bitmap, bitmap_small=NullBitmap, bitmap_disabled=NullBitmap, bitmap_small_disabled=NullBitmap)

      Changes the bitmap of an existing button.                  




      :param `button_id`: ``ID`` of the button to manipulate.   
      :type `button_id`: int
      :param `bitmap`: Large bitmap of the new button. Must be the same size as all other large bitmaps used on the button bar.   
      :type `bitmap`: wx.Bitmap
      :param `bitmap_small`: Small bitmap of the new button. If left as null, then a small bitmap will be automatically generated. Must be the same size as all other small bitmaps used on the button bar.   
      :type `bitmap_small`: wx.Bitmap
      :param `bitmap_disabled`: Large bitmap of the new button when it is disabled. If left as null, then a bitmap will be automatically generated from  `bitmap`.   
      :type `bitmap_disabled`: wx.Bitmap
      :param `bitmap_small_disabled`: Small bitmap of the new button when it is disabled. If left as null, then a bitmap will be automatically generated from  `bitmap_small`.  
      :type `bitmap_small_disabled`: wx.Bitmap












                  



      .. versionadded:: 4.1/wxWidgets-3.1.2  
     








   .. method:: SetButtonMaxSizeClass(self, button_id, max_size_class)

      Sets the maximum size class of a ribbon button.                  

      You have to call :meth:`Realize`   after calling this function to apply the given maximum size. 




      :param `button_id`: ``ID`` of the button to manipulate.   
      :type `button_id`: int
      :param `max_size_class`: The maximum size-class of the button. Buttons on a button bar can have three distinct sizes: ``wx.ribbon.RIBBON_BUTTONBAR_BUTTON_SMALL``, ``wx.ribbon.RIBBON_BUTTONBAR_BUTTON_MEDIUM``, and ``wx.ribbon.RIBBON_BUTTONBAR_BUTTON_LARGE``.  
      :type `max_size_class`: wx.ribbon.RibbonButtonBarButtonState






                  



      .. versionadded:: 4.1/wxWidgets-3.1.2  
     








   .. method:: SetButtonMinSizeClass(self, button_id, min_size_class)

      Sets the minimum size class of a ribbon button.                  

      You have to call :meth:`Realize`   after calling this function to apply the given minimum size. 




      :param `button_id`: ``ID`` of the button to manipulate.   
      :type `button_id`: int
      :param `min_size_class`: The minimum size-class of the button. Buttons on a button bar can have three distinct sizes: ``wx.ribbon.RIBBON_BUTTONBAR_BUTTON_SMALL``, ``wx.ribbon.RIBBON_BUTTONBAR_BUTTON_MEDIUM``, and ``wx.ribbon.RIBBON_BUTTONBAR_BUTTON_LARGE``.  
      :type `min_size_class`: wx.ribbon.RibbonButtonBarButtonState






                  



      .. versionadded:: 4.1/wxWidgets-3.1.2  
     








   .. method:: SetButtonText(self, button_id, label)

      Changes the label text of an existing button.                  




      :param `button_id`: ``ID`` of the button to manipulate.   
      :type `button_id`: int
      :param `label`: New label of the button.  
      :type `label`: string






                  



      .. versionadded:: 4.1/wxWidgets-3.1.2  
     







      .. note:: 

         If text size has changed, :meth:`Realize`   must be called on the top level :ref:`wx.ribbon.RibbonBar`  object to recalculate panel sizes. Use :meth:`SetButtonTextMinWidth`   to avoid calling :meth:`Realize`   after every change.  







      .. seealso:: :meth:`SetButtonTextMinWidth`   








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



      |overload| Overloaded Implementations:

      :html:`<hr class="overloadsep" /><br />`

      
      **SetButtonTextMinWidth** `(self, button_id, min_width_medium, min_width_large)`
      
      Sets the minimum width of the button label, to indicate to the :ref:`wx.ribbon.RibbonArtProvider`  layout mechanism that this is the minimum required size.                  
      
      You have to call :meth:`Realize`   after calling this function to apply the given minimum width. 
      
      
      
      
      :param `button_id`: ``ID`` of the button to manipulate.   
      :type `button_id`: int
      :param `min_width_medium`: Requested minimum width of the button text in pixel if the button is medium size.   
      :type `min_width_medium`: int
      :param `min_width_large`: Requested minimum width of the button text in pixel if the button is large size.  
      :type `min_width_large`: int
      
      
      
      
      
      
      
      
                        
      
      
      
      .. versionadded:: 4.1/wxWidgets-3.1.2  
           
      
      
      
      
      
      
      
      .. note:: 
      
         This function is used together with :meth:`SetButtonText`   to change button labels on the fly without modifying the button bar layout.  
      
      
      
      
      
      
      
      .. seealso:: :meth:`SetButtonText`   
      
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`

      
      **SetButtonTextMinWidth** `(self, button_id, label)`
      
      Sets the minimum width of the button label, to indicate to the :ref:`wx.ribbon.RibbonArtProvider`  layout mechanism that this is the minimum required size.                  
      
      You have to call :meth:`Realize`   after calling this function to apply the given minimum width. 
      
      
      
      
      :param `button_id`: ``ID`` of the button to manipulate.   
      :type `button_id`: int
      :param `label`: The minimum width is set to the width of this label.  
      :type `label`: string
      
      
      
      
      
      
                        
      
      
      
      .. versionadded:: 4.1/wxWidgets-3.1.2  
           
      
      
      
      
      
      
      
      .. note:: 
      
         This function is used together with :meth:`SetButtonText`   to change button labels on the fly without modifying the button bar layout.  
      
      
      
      
      
      
      
      .. seealso:: :meth:`SetButtonText`   
      
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`






   .. method:: SetItemClientData(self, item, data)

      Set the client object associated with a button.                  

      The button bar owns the given object and takes care of its deletion. Please, note that you cannot use both client object and client data. 

                


      :param `item`: 
      :type `item`: RibbonButtonBarButtonBase
      :param `data`: 
      :type `data`: ClientData






      .. versionadded:: 2.9.5 
     








   .. method:: SetShowToolTipsForDisabled(self, show)

      Indicates whether tooltips are shown for disabled buttons.                  

      By default they are not shown. 

                


      :param `show`: 
      :type `show`: bool






      .. versionadded:: 2.9.5 
     








   .. method:: ToggleButton(self, button_id, checked)

      Set a toggle button to the checked or unchecked state.                  




      :param `button_id`: ``ID`` of the toggle button to manipulate.   
      :type `button_id`: int
      :param `checked`: ``True`` to set the button to the toggled/pressed/checked state, ``False`` to set it to the untoggled/unpressed/unchecked state.   
      :type `checked`: bool






                  





   .. attribute:: ActiveItem

      See :meth:`~wx.ribbon.RibbonButtonBar.GetActiveItem`


   .. attribute:: ButtonCount

      See :meth:`~wx.ribbon.RibbonButtonBar.GetButtonCount`


   .. attribute:: HoveredItem

      See :meth:`~wx.ribbon.RibbonButtonBar.GetHoveredItem`


   .. attribute:: ShowToolTipsForDisabled

      See :meth:`~wx.ribbon.RibbonButtonBar.GetShowToolTipsForDisabled` and :meth:`~wx.ribbon.RibbonButtonBar.SetShowToolTipsForDisabled`

