I’m experimenting with wx.aui.AuiNotebook; is there a way I can prevent particular tabs from being closed? i.e. I have an app that allows the user to create multiple tabs in an AuiNotebook, but the first 2 tabs are system managed and I don’t want them to be closed.
Also, in a close event, can I get the window object attached to the tab being closed? (to extract data from it)
I had a similar situation where I wanted to prevent the user from closing the last tab. What I did was binding the
wx.aui.EVT_AUINOTEBOOK_PAGE_CLOSE
event and then in the event handler check for the number of tabs open. If the number of tabs is less than two I toggle thewx.aui.AUI_NB_CLOSE_ON_ACTIVE_TAB
style so that the last tab doesn’t have a close button.