dlgitem_get_select_array
dlgitem_get_select_array(window, dlgitem, array)
Returns an array of selected values in the list dialog item or list tag (in outline lists) identified by dlgitem in window. If dlgitem does not refer to a list dialog item or a list tag (in outline lists), $ERROR is set and 0 is returned. Otherwise, 1 is returned.
• window — A window identifier.
• dlgitem — The value of the control's id attribute.
• array — Specifies the array for the returned values. If a XUI tree control is in single selection mode, the array will be populated with one entry — the list tag of the only selected tree node. If the tree control is in multiple selection mode, the array will be populated with the list tags of all selected nodes in the tree control.
To gather all the items in a dialog list item, regardless of selection, use the
dlgitem_get_list_array function.
Example
Consider a Trees list dialog list item containing the following tree names:
Oak
Maple
Gum
Gingko
Birch
Aspen
If a user selected the Oak and Gum list items, the following expression would gather the selected items and place them in an array called $SelectTrees.
$ret = dlgitem_get_select_array($win, "Trees", $SelectTrees)
The $SelectTrees array would contain the following values:
Values[1]: "Oak"
Values[2]: "Gum"
Related Topics