wx.lib.agw.ribbon.bar.RibbonBarEvent¶
Event used to indicate various actions relating to a RibbonBar
.
See also
RibbonBar
for available event types.
Class Hierarchy¶
Known Superclasses¶
Methods Summary¶
Default class constructor. |
|
This is the opposite of |
|
Returns the page being changed to, or being clicked on. |
|
Returns |
|
Sets the page relating to this event. |
|
Prevents the change announced by this event from happening. |
Class API¶
- class RibbonBarEvent(wx.NotifyEvent)¶
Event used to indicate various actions relating to a
RibbonBar
.See also
RibbonBar
for available event types.
Methods¶
- __init__(self, command_type=None, win_id=0, page=None)¶
Default class constructor.
- Parameters:
command_type (integer) – the event type;
win_id (integer) – the event identifier;
page – an instance of
RibbonPage
.
- 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) orFalse
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.