Older Newer
Mon, 21 Jan 2008 08:53:03 . . . . afh [fix typo]


Changes by last author:

Added:
= RADIOBUTTON =

== Syntax ==

:ctl[n]: RADIOBUTTON(Class Specific Properties), Other Properties

== Description ==

:Sometimes the programmer wants to give the user the ability to select one item from a small group of (usually more than two) options. This can be easily done with radio buttons, list boxes and combo boxes. When implementing radio buttons, the first radio button is defined as the group start, while a groupbox sets the group's end (see the example below). Do not forget to activate one of the radio buttons with Val=1!

== Class Specific Properties ==

:BOTTOM

::Aligns the radiobutton at the bottom of the checkbox's text area.

:FLAT

::Creates a border around the radio button.

:GROUP

::Defines the beginning of the radio button group.

:LEFTTEXT

::Sets text to the left of the radio button.

:MULTILINE

::Allows word-wrapping within the pushbutton's text area.

:PUSHLIKE

::Causes the radiobutton to appear as a depressable pushbutton.

:RIGHTBUTTON

::Sets text to the left of the radio button.

:TOP

::Aligns the radiobutton at the top of the checkbox's text area.

:VCENTER

::Vertically centers the text label within the radiobutton's text area.

== Other Properties ==

:Text

::Defines the text label next to the radio button. (default = no text)

:Val

::Assigns a value to the radio button. (default = 0)

:Color

::Sets the text background color. (default = transparent)

:FontColor

::Sets the color of the text. (default = white)

:Action

::Sets the default action for the control. (default = NONE)

== Example ==

<code>

ctl[0]: RADIOBUTTON(GROUP), "Remove white", Val=1, Pos=(210,20)

ctl[1]: RADIOBUTTON(MULTILINE, TOP), "Adjust contrast and remove color", Pos=(210,30), Size=(70,20)

ctl[2]: GROUPBOX(GROUP, CENTER), "Test", Pos=(200,10), Size=(90,40), Color=CadetBlue

</code>

:Note that the first radio button is activated (value set to one) and declared as the first radio button of the group by way of the GROUP property. The second radio button is moved to the top text line. The last user control, the groupbox, defines the end of the group.

== Notes ==

:You do not need to visually "embrace" the radio buttons with the groupbox. You can create an invisible groupbox and the group items stay untouched.

== Also see ==

:GROUPBOX

== Comments ==

:Everyone can add his comments about his experiences with this function here. Tips for using it are welcome, too.