Index
The Radio Button and how to create it
The Parameters
Radio Button Functions
Important Info

The Radio Button and how to create it

The Radio Button inherits from the control class. It is one of the many ways for an application to input information to the application. A Radio Button is
common in GUI applications as a way to input information that has two or more options, but you can only select one option at a time.

--Radio Button:
f1 = form(10, 10, 100, 100, false, "Main", color.white, color.AirForceBlue, true, false, false, false, false, false, true)
rdb1 = radioButton("First RadioButton", 1, 1, true, color.buttondark, color.green, color.black, f1)
rdb2 = radioButton("Second Radio Button", 1, 10, false, color.buttondark, color.green, color.black, f1)

The code is exactly how you would create a Radio Button. You must have a form created in order to store your Radio Button, as with any other derivative of
the control class. As always you can declare any class two ways and if you dont remember how, read the forms reference here: Forms
The images below shows what the Radio Buttons declared above looks like.
In figure 8, this is what the application looks like right when it is ran. In figure 9, I clicked the second Radio Button. In figure 10, I clicked the second
Radio button again to demonstrate what happens when you click a selected Radio Button.

Figure 8:

Radio Button Image

Figure 9:

Radio Button Image

Figure 10:

Radio Button Image

The Parameters

The Radio Button parameters are as follows:

Parameter Description
string text Sets the Radio Buttons text to the string that was entered.
int x The x location of the Radio Button on the screen.
int y The y location of the Radio Button on the screen.
bool marked Sets the Radio Buttons selected property to either True or False,
determins weather they are marked or not.
color backcolor Sets the Radio Button's outer circle color.
color markcolor Sets the Radio Button's inner circle color.
color txtcolor Sets the Radio Button's text color.
form parent The form that the Radio Button will be visible on.

If you dont know the keywords, go here: Forms

Radio Button Functions

Here are the diffrent functions that you can call that do something with Radio Buttons:

Function Description Call example
none none none

Important Info

Untill I release the group control (WZGUILib v3.0, this version is WZGUILib v3.0_BETA_BV) only one Radio Button should be selected at a time
on the current form unless they are a child of a diffrent control located on said form. If you have two or more Radio Buttons and you want one on top of
another, I suggest that you set the y value to this (prev_radiobutton_y + 9).