Creation/Dev/Script/Client/GuiRadioCtrl: Difference between revisions

From Graal Bible
mNo edit summary
 
(Added picture, description and an example script)
Line 1: Line 1:
<pre>
Inherits [[Creation/Dev/Script/Client/GuiCheckBoxCtrl|GuiCheckBoxCtrl]].
        GuiRadioCtrl (GuiCheckBoxCtrl):
 
</pre>
=Description=
 
[[Image:Guicontrol_radio.png]]
 
Use the ''text'', ''checked'' and ''groupnum'' variables described in [[Creation/Dev/Script/Client/GuiButtonBaseCtrl|GuiButtonBaseCtrl]] to modify this control. When two radio buttons have the same ''groupnum'' then it is automatically unchecking the other radio buttons when you click on one of them.
 
 
=Example=
 
  new GuiRadioCtrl("Test_Radio1") {
    profile = GuiBlueRadioProfile;
    x = 10;
    y = 10;
    width = 100;
    height = 20;
    groupnum = 1;
    text = "Radio button 1";
  }
  new GuiRadioCtrl("Test_Radio2") {
    profile = GuiBlueRadioProfile;
    x = 10;
    y = 30;
    width = 100;
    height = 20;
    groupnum = 1;
    text = "Radio button 2";
  }

Revision as of 18:48, 16 September 2006

Inherits GuiCheckBoxCtrl.

Description

Guicontrol radio.png

Use the text, checked and groupnum variables described in GuiButtonBaseCtrl to modify this control. When two radio buttons have the same groupnum then it is automatically unchecking the other radio buttons when you click on one of them.


Example

 new GuiRadioCtrl("Test_Radio1") {
   profile = GuiBlueRadioProfile;
   x = 10;
   y = 10;
   width = 100;
   height = 20;
   groupnum = 1;
   text = "Radio button 1";
 }
 new GuiRadioCtrl("Test_Radio2") {
   profile = GuiBlueRadioProfile;
   x = 10;
   y = 30;
   width = 100;
   height = 20;
   groupnum = 1;
   text = "Radio button 2";
 }