[wxpython-users] Catching user leaving the window

Werner F. Bruhin werner.bruhin at free.fr
Mon Sep 8 04:10:10 PDT 2008


I have a FlatNotebook and use the event "EVT_FLATNOTEBOOK_PAGE_CHANGING" 
to catch page changing to ensure that user either saves data before 
changing to another page.

This works fine as long as user goes to another notebook page, but if 
they go "outside" the flatnotebook I can't find an event which lets me 
catch this.

Tried "EVT_CHILD_FOCUS" but that fires very often and I haven't figured 
out a nice way to just rollback the database connection in the right 
situation.

I also tried "EVT_KILL_FOCUS" but does not seem to fire for the 
flatnotebook - is this a known issue?

Do I have any other options?

Werner




More information about the wxpython-users mailing list