HTBasic Help
×
Menu
Index

List Widget - Selection

 
If the value of the MULTISELECT attribute is 0, the variable associated with SELECTION must be a single numeric variable. That variable specifies the index of the element in the ITEMS array that is selected. A value of "-1" indicates no selection.
 
If the value of the MULTISELECT attribute is "1", the variable associated with SELECTION must be a numeric array. That array must be at least as large as the ITEMS array. Each element of the SELECTION array will return either a "1" (indicating that the corresponding items element is selected) or a "0" (indicating that the corresponding items element is not selected).
 
Because all arrays are treated as a single-dimension, BASE 0 array, the SELECTION attribute used in LIST returns an integer that specifies an offset, not necessarily the actual subscript, of the selected element in the ITEMS array.