wxNotebookEvent::GetSelection
int GetSelection() const
Returns the currently selected page, or -1 if none was selected.
NB: under Windows, GetSelection() will return the same value as
GetOldSelection() when called from EVT_NOTEBOOK_PAGE_CHANGING
handler and not the page which is going to be selected.Bummer. So I can't use EVT_NOTEBOOK_PAGE_CHANGING.
Next I tried hooking up a EVT_PAINT event for the panel which is on
the notebook page. I thought, I could "deadvance" the user to the
previous page depending on whether he entered something or not. So,
I did in the event:
You can do this by catching the EVT_NOTEBOOK_CHANGED and then change the
pack back to the event.GetOldSelection() page.
···
--
Robin Dunn
Software Craftsman
robin@AllDunn.com Java give you jitters?
http://wxPython.org Relax with wxPython!
I ran into this a while ago; I ended up storing the current notebook page.
I catch EVT_PAGE_CHANGING, and if I veto the event (I don't let the page change under
certain circumstances), I set the page back to my stored value.
ttfn
Ginny Keech