Kirix Support Forums

wxAuiMultiNotebook - catching tab closure

Please post all general questions, comments, bug reports, and any other wxAUI feedback here.

wxAuiMultiNotebook - catching tab closure

Postby dpage on Wed Aug 23, 2006 4:14 am

[I previously posted this to the wx-users list but got no response - apologies if this is noise for anyone]

wxWidgets 2.7.0
Windows XP Pro SP2
Visual C++ 2005


I'm trying to use the new wxAuiMultiNotebook class and have a number of
tabs for which I need to prevent closure. I'm trying to catch the
EVT_AUINOTEBOOK_PAGE_BUTTON event when the user hits the close button so
I can check what is being closed and veto it if required. The event
never seems to fire though, or perhaps more accurately, it never gets
seen by my code. I have no problem with EVT_AUINOTEBOOK_PAGE_CHANGING on
the same instance.

I have the following in my event table:


Along with a corresponding frmMain::OnNotebookButton which never gets

From my limited understanding of the AUI code, the ID is that of the
containing tab control which is unknown to the app, especially if the
user has split the notebook into multiple tabs - hence my use of

I'd appreciate any suggestions or solutions :-)

Thanks, Dave.
Registered User
Posts: 7
Joined: Fri Jul 14, 2006 5:17 am

Return to wxAUI Questions, Thoughts & Feedback