Cancel button in XRC

Eli Golovinsky wrote:

Robin Dunn wrote:

Yes. If you want to use a non-standard ID for your dialog buttons then you need to create a EVT_BUTTON handler and binding for them.

Oh, that's interesting. Didn't realize that when I use standard ID's I don't need to bind the EVT_BUTTON events myself.

Just for wx.ID_OK and wx.ID_CANCEL. wx.Dialog has default handlers for these two. Also, if you want ESC to do the same thing as your Cancel button then you should really use wx.ID_CANCEL because, IIRC, wx just transforms the ESC key event into a wx.ID_CANCEL button event.

ยทยทยท

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