Jump to content

CASTORGUI::GUIRadio::setChecked() not work


Ingo Chou
 Share

Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...