Hi all,
How do i set the default button for a Wx::StdDialogButtonSizer?
Any hints would be appreciated.
regards.
bio.
Hi all,
How do i set the default button for a Wx::StdDialogButtonSizer?
Any hints would be appreciated.
regards.
bio.
Fabio P. 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
Wx::Button#set_default() I think does what you want, but I haven’t tested
it.
It works.
If you need to retrieve the Button object from the ButtonSizer to call
this, you could use something likedialog.find_window(Wx::ID_OK)
(in this case, to make ‘OK’ the default selection)
Just to let you know:
it doesn’t works for me, i get this error:
undefined method ‘find_window’ for
#Views::Dialog::LoginDialog:0xc9e30d4
LoginDialog is a subclass of Wx::Dialog
I’ve got it using xrcresource combinations methods:
Wx::Window.find_window_by_id(Wx::xrcid(‘wxID_OK’), parent)
Thank you.
bio
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs