[wxruby-users] StdDialogButtonSizer default button

Alex Fenton alex at pressure.to
Mon Oct 6 08:36:52 EDT 2008


Fabio Petrucci wrote:
> How do i set the default button for a Wx::StdDialogButtonSizer?
>
> Any hints would be appreciated.

Wx::Button#set_default() I think does what you want, but I haven't 
tested it.

If you need to retrieve the Button object from the ButtonSizer to call 
this, you could use something like

dialog.find_window(Wx::ID_OK)

(in this case, to make 'OK' the default selection)

alex


More information about the wxruby-users mailing list