I m working on a login/pass protected application and have some problem with the esc key. I need the user to identify himself before using the application. I have a modal dialog with login and password entry, but i don t want it to be closed when the user hit the esc key. First i thought that the OnCancel method was called but it doesn t seem to. I tried to intercept the hit on the esc key with EVT_CHAR_HOOK, EVT_KEY_DOWN, EVT_KEY_UP and EVT_CHAR but it doesn t work.
I m working on a login/pass protected application and have some
problem with the esc key. I need the user to identify himself
before using the application. I have a modal dialog with login
and password entry, but i don t want it to be closed when the
user hit the esc key.
You can try catching EVT_BUTTON for wxID_CANCEL. Otherwise you can check
the return value of ShowMOdal() and if it's wxID_CANCEL then simply show the
dialog again.
···
--
Robin Dunn
Software Craftsman
robin@AllDunn.com Java give you jitters? http://wxPython.org Relax with wxPython!