Is there a way to catch auinotebook tab close event and cancel it?
I want to perform some tests before page is closed, and depending on test results decide if page closing is allowed.
I have tried to Bind EVT_AUINOTEBOOK_PAGE_CLOSE to event handler.
It seems like this event happens just before page is closed (references to page are still available). However it doesnot matters if there is or there is not event.Skip() inside handler, page in both cases is closed.
Also I have tried EVT_AUINOTEBOOK_PAGE_CHANGED. It happens after page is closed (references to page causes error).
Working on windows xp, python2.5, wxpython 2.8.9.1.
Is there a way to catch auinotebook tab close event and cancel it?
I want to perform some tests before page is closed, and depending on test results decide if page closing is allowed.
I have tried to Bind EVT_AUINOTEBOOK_PAGE_CLOSE to event handler.
It seems like this event happens just before page is closed (references to page are still available). However it doesnot matters if there is or there is not event.Skip() inside handler, page in both cases is closed.
Also I have tried EVT_AUINOTEBOOK_PAGE_CHANGED. It happens after page is closed (references to page causes error).
Working on windows xp, python2.5, wxpython 2.8.9.1.
Is there a way to catch auinotebook tab close event and cancel it?
I want to perform some tests before page is closed, and depending on
test results decide if page closing is allowed.
I have tried to Bind EVT_AUINOTEBOOK_PAGE_CLOSE to event handler.
It seems like this event happens just before page is closed
(references to page are still available). However it doesnot matters
if there is or there is not event.Skip() inside handler, page in
both cases is closed.
Try calling event.Veto() in the event handler.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
Is there a way to catch auinotebook tab close event and cancel it?
I want to perform some tests before page is closed, and depending on
test results decide if page closing is allowed.
I have tried to Bind EVT_AUINOTEBOOK_PAGE_CLOSE to event handler.
It seems like this event happens just before page is closed
(references to page are still available). However it doesnot matters
if there is or there is not event.Skip() inside handler, page in
both cases is closed.
Try calling event.Veto() in the event handler.
–
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!