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

From Graal Bible
mNo edit summary
 
No edit summary
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
<pre>
[[Category:Scripting Reference]]
        GuiRadioCtrl (GuiCheckBoxCtrl):
Inherits [[Creation/Dev/Script/Client/GuiCheckBoxCtrl|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";
  }

Latest revision as of 00:55, 16 February 2010

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";
 }