.. 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 .. currentmodule:: wx.lib.agw.ribbon.bar .. highlight:: python .. _wx.lib.agw.ribbon.bar.RibbonBarEvent: ========================================================================================================================================== |phoenix_title| **wx.lib.agw.ribbon.bar.RibbonBarEvent** ========================================================================================================================================== Event used to indicate various actions relating to a :class:`RibbonBar`. .. seealso:: :class:`RibbonBar` for available event types. | |class_hierarchy| Class Hierarchy ================================= .. raw:: html
Inheritance diagram for class RibbonBarEvent:
| |super_classes| Known Superclasses ================================== :class:`wx.NotifyEvent` | |method_summary| Methods Summary ================================ ================================================================================ ================================================================================ :meth:`~wx.lib.agw.ribbon.bar.RibbonBarEvent.__init__` Default class constructor. :meth:`~wx.lib.agw.ribbon.bar.RibbonBarEvent.Allow` This is the opposite of :meth:`~RibbonBarEvent.Veto`: it explicitly allows the event to be processed. :meth:`~wx.lib.agw.ribbon.bar.RibbonBarEvent.GetPage` Returns the page being changed to, or being clicked on. :meth:`~wx.lib.agw.ribbon.bar.RibbonBarEvent.IsAllowed` Returns ``True`` if the change is allowed ( :meth:`~RibbonBarEvent.Veto` hasn't been called) or :meth:`~wx.lib.agw.ribbon.bar.RibbonBarEvent.SetPage` Sets the page relating to this event. :meth:`~wx.lib.agw.ribbon.bar.RibbonBarEvent.Veto` Prevents the change announced by this event from happening. ================================================================================ ================================================================================ | |api| Class API =============== .. class:: RibbonBarEvent(wx.NotifyEvent) Event used to indicate various actions relating to a :class:`RibbonBar`. .. seealso:: :class:`RibbonBar` for available event types. .. method:: __init__(self, command_type=None, win_id=0, page=None) Default class constructor. :param integer `command_type`: the event type; :param integer `win_id`: the event identifier; :param `page`: an instance of :class:`~wx.lib.agw.ribbon.page.RibbonPage`. .. method:: Allow(self) This is the opposite of :meth:`~RibbonBarEvent.Veto`: it explicitly allows the event to be processed. For most events it is not necessary to call this method as the events are allowed anyhow but some are forbidden by default (this will be mentioned in the corresponding event description). .. method:: GetPage(self) Returns the page being changed to, or being clicked on. :returns: An instance of :class:`~wx.lib.agw.ribbon.page.RibbonPage`. .. method:: IsAllowed(self) Returns ``True`` if the change is allowed ( :meth:`~RibbonBarEvent.Veto` hasn't been called) or ``False`` otherwise (if it was). .. method:: SetPage(self, page) Sets the page relating to this event. :param `page`: an instance of :class:`~wx.lib.agw.ribbon.page.RibbonPage`. .. method:: Veto(self) Prevents the change announced by this event from happening. .. note:: It is in general a good idea to notify the user about the reasons for vetoing the change because otherwise the applications behaviour (which just refuses to do what the user wants) might be quite surprising.