Push OK button when pressing enter

Vadim Zeitlin vadim at wxwidgets.org
Wed Dec 5 03:38:03 PST 2007


On Wed, 5 Dec 2007 12:16:54 +0100 (CET) koen at vermeer.tv wrote:

> Thanks for the reply. I did that for buttons, but I didn't realize that I
> should to the same when using wxStdDialogButtonSizer.

 wxDialog::CreateStdDialogButtonSizer() normally call SetDefault() for you
on the appropriate button.

> I currently do not save the pointer to the buttons that I add to the
> wxStdDialogButtonSizer, but I guess I'll have to if I want to call
> SetDefault() on it. Or can I somehow retrieve the pointer to the buttons
> from wxStdDialogButtonSizer?

 Use FindWindow(id).

 Regards,
VZ

-- 
TT-Solutions: wxWidgets consultancy and technical support
               http://www.tt-solutions.com/





More information about the wx-users mailing list