WinXAddRadioButton


hRadio = WinXAddRadioButton (parent, STRING title, isFirst, pushlike, id)

Creates a radio button and adds it to a window

Parameter Description
parent The window to add the radio button to
STRING title The text to appear to the right of the radio button
isFirst $$TRUE if this is the first radio button in a group
pushlike $$TRUE to render this radio button as a pushbutton
id the unique id constant for this control

Returns

The handle to the radio button or 0 on fail

Remarks

The isFirst parameter is used to define groups of radio buttons. The radio buttons within a group are mutually exclusive. That is, only one can be selected at any one time. The user can move between radio buttons within a group if the dialog interface is enabled. To group your radio buttons, set the isFirst parameter to $$TRUE for the first radio button in the group and $$FALSE for all subsequent radio buttons.

If pushlike is $$TRUE, this function will create a pushbutton which can be toggled from pressed to unpressed, corresponding to the checked and unchecked states of a radio box.

Examples

'define constants
$$ID_RADIO1 = 100
$$ID_RADIO2 = 101
$$ID_RADIO3 = 102

'create a set of check boxes
hCheck1 = WinXAddRadioButton (#hMain, "Item 1", $$TRUE, $$FALSE, $$ID_RADIO1)
hCheck2 = WinXAddRadioButton (#hMain, "Item 2", $$FALSE, $$FALSE, $$ID_RADIO2)
hCheck3 = WinXAddRadioButton (#hMain, "Item 3", $$FALSE, $$FALSE, $$ID_RADIO3)

Related Links

WinXButton_SetCheck
WinXButton_GetCheck
WinXEnableDialogInterface