Radio Button Syntax
Syntax
Arguments
- %Directives%
Refer to Xdialog Language Directives and Operators.
- ()
Character. The leading ( and trailing ) characters are required.
- Variable_Name
Character. The name of a character variable to receive the user selection, or a numeric variable to receive the index value of the selected radio button. The index of the top-most button is 1.
- Choices
Character. See Choices Syntax.
- Event
Character. Optional. See Event Syntax.
- Enabled
Character. Optional. See Enabled Syntax.
Description
One or more Radio Button objects may appear inside the Format section of a UI_DLG_BOX() function. If you are testing the value of the selected radio button, it is advisable to use ALLTRIM().
Example
The following script displays a dialog with three radio buttons: Picture
mode = 1
result=ui_dlg_box("Title",<<%dlg%
Filename: .32filename;
Open as? ;
(mode={Shared,Read only,Exclusive});
%dlg%, <<%code%
if a_dlg_button = "mode" then
if (alltrim(mode) = "Shared") then
do something
end if
end if
%code%)The next script uses a CR-LF delimited list of choices.
choices = "Shared" + crlf()+ "Read only" + crlf()+ "Exclusive"
mode = 2
result=ui_dlg_box("Title",<<%dlg%
Filename: .32filename;
Open as? ;
(mode=choices);
%dlg% )The next script uses an array of choices.
dim result as N
dim choices3 as C
choices1 = "Shared"
choices2 = "Read only"
choices3 = "Exclusive"
mode = 3
result=ui_dlg_box("Title",<<%dlg%
Filename: .32filename;
Open as? ;
(mode=choices);
%dlg% )See Also


