Event used to indicate various actions relating to a RibbonBar
.
See also
RibbonBar
for available event types.
__init__ |
Default class constructor. |
Allow |
This is the opposite of Veto : it explicitly allows the event to be processed. |
GetPage |
Returns the page being changed to, or being clicked on. |
IsAllowed |
Returns True if the change is allowed ( Veto hasn’t been called) or |
SetPage |
Sets the page relating to this event. |
Veto |
Prevents the change announced by this event from happening. |
RibbonBarEvent
(wx.NotifyEvent)¶Event used to indicate various actions relating to a RibbonBar
.
See also
RibbonBar
for available event types.
__init__
(self, command_type=None, win_id=0, page=None)¶Default class constructor.
Parameters: |
|
---|
Allow
(self)¶This is the opposite of 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).
GetPage
(self)¶Returns the page being changed to, or being clicked on.
Returns: | An instance of RibbonPage . |
---|
IsAllowed
(self)¶Returns True
if the change is allowed ( Veto
hasn’t been called) or
False
otherwise (if it was).
SetPage
(self, page)¶Sets the page relating to this event.
Parameters: | page – an instance of RibbonPage . |
---|
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.