<div dir="ltr"><br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Wx::Button#set_default() I think does what you want, but I haven't tested it.</blockquote>
<div><br>It works.<br> <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
If you need to retrieve the Button object from the ButtonSizer to call this, you could use something like<br>
<br>
dialog.find_window(Wx::ID_OK)<br>
<br>
(in this case, to make 'OK' the default selection)<br>
<br></blockquote></div><br>Just to let you know:<br>it doesn't works for me, i get this error:<br>undefined method 'find_window' for #<Views::Dialog::LoginDialog:0xc9e30d4><br><br>LoginDialog is a subclass of Wx::Dialog<br>
<br>I've got it using xrcresource combinations methods:<br><br>Wx::Window.find_window_by_id(Wx::xrcid('wxID_OK'), parent)<br><br>Thank you.<br><br>bio<br><br><br></div>