wxWizard Escape Key

How can I change the wizard functionality so it doesnt "cancel," when the user presses the escape key? Thanks.

Gilad

have you tried remapping witht the wxAcceleratorTable and use the keycode
WXK_ESCAPE ?

···

----- Original Message -----
From: "Gilad Suberri" <gsuberri@eos.east.hitc.com>
To: "wxPython-users" <wxpython-users@lists.wxwindows.org>
Sent: Friday, November 07, 2003 10:31 AM
Subject: [wxPython-users] wxWizard Escape Key

How can I change the wizard functionality so it doesnt "cancel," when the
user presses the escape key? Thanks.

Gilad

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.423 / Virus Database: 238 - Release Date: 26/11/2002

Gilad Suberri wrote:

How can I change the wizard functionality so it doesnt "cancel," when the user presses the escape key? Thanks.

ESC in dialogs emits a EVT_BUTTON event with an id of wxID_CANCEL. You can try catching that event.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

I am trying this, but the OnWizardButton function is not being called when I
hit ESC key:

wizardID = wxNewId()
wizard = wxWizard(parent, wizardID, "RD",readerImage.ConvertToBitmap() )
EVT_BUTTON(self, wizardID, self.OnWizardButton)

By the way, does pressing the ESC key and the Cancel button, generate the
same events? How can I differentiate between them?

···

----- Original Message -----
From: "Robin Dunn" <robin@alldunn.com>
To: <wxPython-users@lists.wxwindows.org>
Sent: Friday, November 07, 2003 10:52 PM
Subject: Re: [wxPython-users] wxWizard Escape Key

Gilad Suberri wrote:
> How can I change the wizard functionality so it doesnt "cancel," when

the user presses the escape key? Thanks.

ESC in dialogs emits a EVT_BUTTON event with an id of wxID_CANCEL. You
can try catching that event.

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwindows.org
For additional commands, e-mail: wxPython-users-help@lists.wxwindows.org

Gilad Suberri wrote:

I am trying this, but the OnWizardButton function is not being called when I
hit ESC key:

wizardID = wxNewId()
wizard = wxWizard(parent, wizardID, "RD",readerImage.ConvertToBitmap() )
EVT_BUTTON(self, wizardID, self.OnWizardButton)

Try this instead:

  EVT_BUTTON(wizard, wxID_CANCEL, self.OnWizardButton)

BTW, the default handler generates the EVT_WIZARD_CANCEL event and you can Veto the event in that handler if you don't want the dialog to exit.

By the way, does pressing the ESC key and the Cancel button, generate the
same events? How can I differentiate between them?

I'm not sure.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!