.. 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.ribbon.RibbonButtonBarEvent:

==========================================================================================================================================
|phoenix_title|  **wx.ribbon.RibbonButtonBarEvent**
==========================================================================================================================================

Event used to indicate various actions relating to a button on a :ref:`wx.ribbon.RibbonButtonBar`.          

For toggle buttons, :meth:`~wx.ribbon.RibbonButtonBarEvent.IsChecked`  can be used to test the state of the button. 

See :ref:`wx.ribbon.RibbonButtonBar`  for available event types. 







         



.. seealso:: :ref:`wx.ribbon.RibbonBar`    







|

|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>RibbonButtonBarEvent</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.RibbonButtonBarEvent_inheritance.png" alt="Inheritance diagram of RibbonButtonBarEvent" 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.Event.html" title="wx.Event" alt="" coords="81,83,159,112"/> <area shape="rect" id="node3" href="wx.CommandEvent.html" title="wx.CommandEvent" alt="" coords="47,160,192,189"/> <area shape="rect" id="node2" href="wx.Object.html" title="wx.Object" alt="" coords="79,5,160,35"/> <area shape="rect" id="node4" href="wx.ribbon.RibbonButtonBarEvent.html" title="wx.ribbon.RibbonButtonBarEvent" alt="" coords="5,237,235,267"/> </map> 
   </p>

|


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

================================================================================ ================================================================================
:meth:`~wx.ribbon.RibbonButtonBarEvent.__init__`                                 Constructor.
:meth:`~wx.ribbon.RibbonButtonBarEvent.GetBar`                                   Returns the bar which contains the button which the event relates to.
:meth:`~wx.ribbon.RibbonButtonBarEvent.GetButton`                                Returns the button which the event relates to.
:meth:`~wx.ribbon.RibbonButtonBarEvent.PopupMenu`                                Display a popup menu as a result of this (dropdown clicked) event.
:meth:`~wx.ribbon.RibbonButtonBarEvent.SetBar`                                   Sets the button bar relating to this event.
:meth:`~wx.ribbon.RibbonButtonBarEvent.SetButton`                                Sets the button relating to this event.
================================================================================ ================================================================================


|


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

================================================================================ ================================================================================
:attr:`~wx.ribbon.RibbonButtonBarEvent.Bar`                                      See :meth:`~wx.ribbon.RibbonButtonBarEvent.GetBar` and :meth:`~wx.ribbon.RibbonButtonBarEvent.SetBar`
:attr:`~wx.ribbon.RibbonButtonBarEvent.Button`                                   See :meth:`~wx.ribbon.RibbonButtonBarEvent.GetButton` and :meth:`~wx.ribbon.RibbonButtonBarEvent.SetButton`
================================================================================ ================================================================================


|


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


.. class:: wx.ribbon.RibbonButtonBarEvent(CommandEvent)

   **Possible constructors**::

       RibbonButtonBarEvent(command_type=wxEVT_NULL, win_id=0, bar=None,
                            button=None)
       
   
   Event used to indicate various actions relating to a button on a
   RibbonButtonBar.



   .. method:: __init__(self, command_type=wxEVT_NULL, win_id=0, bar=None, button=None)

      Constructor.                  


      :param `command_type`: 
      :type `command_type`: wx.EventType
      :param `win_id`: 
      :type `win_id`: int
      :param `bar`: 
      :type `bar`: wx.ribbon.RibbonButtonBar
      :param `button`: 
      :type `button`: RibbonButtonBarButtonBase







   .. method:: GetBar(self)

      Returns the bar which contains the button which the event relates to.                  

      :rtype: :ref:`wx.ribbon.RibbonButtonBar`








   .. method:: GetButton(self)

      Returns the button which the event relates to.                  

                

      :rtype: :ref:`RibbonButtonBarButtonBase`







      .. versionadded:: 2.9.5 
     








   .. method:: PopupMenu(self, menu)

      Display a popup menu as a result of this (dropdown clicked) event.                  


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




      :rtype: `bool`








   .. method:: SetBar(self, bar)

      Sets the button bar relating to this event.                  


      :param `bar`: 
      :type `bar`: wx.ribbon.RibbonButtonBar







   .. method:: SetButton(self, bar)

      Sets the button relating to this event.                  

                


      :param `bar`: 
      :type `bar`: RibbonButtonBarButtonBase






      .. versionadded:: 2.9.5 
     








   .. attribute:: Bar

      See :meth:`~wx.ribbon.RibbonButtonBarEvent.GetBar` and :meth:`~wx.ribbon.RibbonButtonBarEvent.SetBar`


   .. attribute:: Button

      See :meth:`~wx.ribbon.RibbonButtonBarEvent.GetButton` and :meth:`~wx.ribbon.RibbonButtonBarEvent.SetButton`

