ADDOBJECT "OptionButton", name, xpos, ypos,
width, height
Description
OptionButton is used to display a button object with a circular toggle that floats over the output window. The required component, name, is the name of a variable that is added to the program to reference the object following standard variable naming conventions. The required components, xpos, ypos, width, and height are numeric expressions that set the location and size of the object in pixels, measured from the upper left corner. The Value property is FALSE, when the circle is empty; the Value property is TRUE, when the circle is full.
To group several OptionButtons into an exclusive group, often called RadioButtons, use the Group property. Setting Group to True starts a new group. Subsequent OptionButtons with Group set to false will become part of that same group, in order of creation.
Properties Supported (see "Properties")
Alignment, BackColor, Caption, Enabled, FontBold, FontItalic, FontName, FontSize, FontStrikethru, FontUnderline, ForeColor, Group, Height, Hwnd, Left, Name, ParentHWnd, TabStop, Tag, Text, Timer, Top, Value, Visible, Width, WindowLong
Methods Supported (see "Methods")
Hide, Move, SetFocus, Show
Events Supported (see "Events")
Click, GotFocus, KeyDown, KeyPress, KeyUp, LostFocus, Timerf
Example
REM OptionButton Example
'OptionButton is atogglebuttonwithacircle
'often referred to as a Radio Button
addobject "optionbutton","o1",10,10,100,20
o1.caption="Female"
o1.value=true
addobject "optionbutton","o2",10,30,100,20
o2.caption="Male"
o2.group=false
addobject "optionbutton","o3",10,50,100,20
o3.caption="Undisclosed"
o3.group=false
Output

Related Items
ADDOBJECT, CheckBox, Events, Methods, Properties