Ingo Chou Posted December 3, 2015 Share Posted December 3, 2015 Hello, The GUI API: CASTORGUI::GUIRadio::setChecked(true), CASTORGUI::GUIRadio::setChecked(false) is not work. In addition, would you please set a group for some related radio buttons? So, there is one and only one radio button be checked at any time in this group. e.g. var myPanel = new CASTORGUI.GUIPanel(); var myRadio_1 = new CASTORGUI.GUIRadio(); myRadio_1.group = 0; // or string name var myRadio_2 = new CASTORGUI.GUIRadio(); myRadio_2.group = 0; var myRadio_3 = new CASTORGUI.GUIRadio(); myRadio_3.group = 0; myPanel.add(myRadio_1); myPanel.add(myRadio_2); myPanel.add(myRadio_3); myPanel.setVisible(true); Thanks for your reply and help. Quote Link to comment Share on other sites More sharing options...
Dad72 Posted December 3, 2015 Share Posted December 3, 2015 Hello, This is because setChecked asked two arguments (elementId and boolean), but I remove the parameter elementId that is not useful.So it is correct and it works now. I also add to the element GUICheckbox the function : isChecked() and setChecked(bool) (as for GUIRadio element) and updated documentation. Wingnut 1 Quote Link to comment Share on other sites More sharing options...
Ingo Chou Posted December 4, 2015 Author Share Posted December 4, 2015 OK, thanks. How about my second question? Many programming languages are used in this way, it is easy to use. Quote Link to comment Share on other sites More sharing options...
Dad72 Posted December 4, 2015 Share Posted December 4, 2015 I add the option {name: ""} to group your radio buttons. By default, the option "name" = "NameRadio"+id That's what you were asking? I've also added a option tabindex for all form elements. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.