Check Box List Box Control Syntax
Syntax
[.Width,Height Variable_Name^$Choices]
[.Width,Height Variable_Name^$$Choices]
Argument |
Type |
Description |
| [ ^$ ] or [ ^$$ ] | C |
The leading [ and trailing ] and the ^$ or ^$$ characters are required.. |
| Width | N |
The width of the control. |
| Height | N |
The height of the control. |
| Variable_Name | C |
The variable that receives the user's selections. If the ^$ directive is used, variable_name is a string of characters with either a space, or 'T' in each position in the string. The string has a length equal to the number of choices listed in the check box-list box. If an entry in the check box-list box is selected, the corresponding position in the string is set to 'T'. If it is not selected, then the corresponding position in the string is set to a blank value. For example, if the check box-list box has 5 entries, and the 1st and 3rd entries are selected by the user, variable_name will be: 'T-T-- ' (where – designates a space). If the ^$$ directive is used, variable_name is a CR-LF delimited list of entries corresponding to the values in the check box-list box selected by user. |
| Choices | C |
Refer to Choices Syntax. |
Description
A check box-list box is a control type that displays a list of choices in a list box. Each entry has a check box to the left of the entry. The user can select multiple entries in the list box by checking the check box for each entry that he wants to select.
Example
The following script displays two check box-list boxes. One of the controls uses the '^$' directive, and the other uses the '^$$' directive. In addition, the value of the variable that contains the user selections is shown. You can see how in one case this variable contains a string of blanks and 'T's, and in the other case the variable contains a CR-LF delimited string. [Picture]
colors = "Red,Green,Yellow,Blue,Purple,Orange,Lime,Cyan" colors = stritran(colors,",",crlf()) dim a_colors[20] as C a_colors.initialize(colors) dim a_selected[20] as C ui_dlg_box("Check Box-List Box",<<%dlg% {frame=1,1} {region} This control uses the '^$' directive.; [.25,10color1_selected^$colors]; {lf}; Value of check box-list box variable:; [.25color1_selected]; {endregion}| {frame=1,1} {region} This control uses the '^$$' directive.; [.25,10color2_selected^$$colors!select_color]; {lf}; Value of check box-list box variable:; [.25,10colorname^#a_selected]; {endregion} %dlg%,<<%code% if a_dlg_button = "select_color" then a_dlg_button = "" a_selected.clear() a_selected.initialize(color2_selected) end if %code%) |

See Also
Xdialog Language Directives and Operators, Xdialog Control Reference
Supported By
Alpha Five Version 5 and Above