Enter button default behavior?

Hi friends!

How I can make following thing: for dialog box (with two standart button - wxID_OK and wxID_CANCEL) I want setup such behavior, if user click Enter button on keyboard when dialog box in a focus, then this event should process as if wxID_OK was clicked. What event I should catch and how I should process it to achive such results?

Thanks!

···

--
Basil Shubin
Freelance Software Developer

Use
     okay = wx.Button(self, wx.ID_OK)
     okay.SetDefault()

Phil

···

At 10:27 PM 11/11/2006, Basil Shubin wrote:

How I can make following thing: for dialog box (with two standart button - wxID_OK and wxID_CANCEL) I want setup such behavior, if user click Enter button on keyboard when dialog box in a focus, then this event should process as if wxID_OK was clicked. What event I should catch and how I should process it to achive such results?