Creation/Dev/Script/Client/GuiRadioCtrl: Difference between revisions
From Graal Bible
mNo edit summary |
Pooper200000 (talk | contribs) No edit summary |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
[[Category:Scripting Reference]] | |||
Inherits [[Creation/Dev/Script/Client/GuiCheckBoxCtrl|GuiCheckBoxCtrl]]. | |||
=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 23:55, 15 February 2010
Inherits GuiCheckBoxCtrl.
Description
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"; }