AGW Logo

agw_title FlatNotebookEvent

This events will be sent when a EVT_FLATNOTEBOOK_PAGE_CHANGED, EVT_FLATNOTEBOOK_PAGE_CHANGING, EVT_FLATNOTEBOOK_PAGE_CLOSING, EVT_FLATNOTEBOOK_PAGE_CLOSED and EVT_FLATNOTEBOOK_PAGE_CONTEXT_MENU is mapped in the parent.

hierarchy Inheritance Diagram

Inheritance diagram for: FlatNotebookEvent

Inheritance diagram of FlatNotebookEvent


method_summary Methods Summary

__init__Default class constructor.
AllowThis is the opposite of Veto: it explicitly allows the event to be processed.
GetNotifyEventReturns the actual wx.NotifyEvent.
GetOldSelectionReturns the page that was selected before the change, -1 if none was selected.
GetSelectionReturns the currently selected page, or -1 if none was selected.
IsAllowedReturns True if the change is allowed (Veto hasn’t been called) or
SetOldSelectionSets the id of the page selected before the change.
SetSelectionSets the event selection.
VetoPrevents the change announced by this event from happening.

API Class API

class FlatNotebookEvent(wx.PyCommandEvent)[source]

This events will be sent when a EVT_FLATNOTEBOOK_PAGE_CHANGED, EVT_FLATNOTEBOOK_PAGE_CHANGING, EVT_FLATNOTEBOOK_PAGE_CLOSING, EVT_FLATNOTEBOOK_PAGE_CLOSED and EVT_FLATNOTEBOOK_PAGE_CONTEXT_MENU is mapped in the parent.



__init__(eventType, eventId=1, nSel=-1, nOldSel=-1)[source]

Default class constructor.

Parameters:
  • eventType – the event type;
  • eventId – the event identifier;
  • nSel – the current selection;
  • nOldSel – the old selection.


Allow()[source]

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).



GetNotifyEvent()[source]

Returns the actual wx.NotifyEvent.



GetOldSelection()[source]

Returns the page that was selected before the change, -1 if none was selected.



GetSelection()[source]

Returns the currently selected page, or -1 if none was selected.



IsAllowed()[source]

Returns True if the change is allowed (Veto hasn’t been called) or False otherwise (if it was).



SetOldSelection(nOldSel)[source]

Sets the id of the page selected before the change.

Parameters:nOldSel – an integer specifying the old selection.


SetSelection(nSel)[source]

Sets the event selection.

Parameters:nSel – an integer specifying the new selection.


Veto()[source]

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.

Tree

Table Of Contents

Previous topic

FlatNotebookDragEvent

Next topic

PageContainer