listbox.selected Property


value = listbox.selected(item);
listbox.selected(item) = value;

Returns true/false if the specified item is selected or not. Set to true to select the item or to false to remove selection. You can set or clear the selection on all items if you pass -1 as the item index.

Parameters

item
Required. Either an integer as the zero-based index of the item or a string specifying the item text. The string may be a regular expression.

Example

// Test get/set selected
    ListBox.selected("\\Second.*") = true;
    if (!ListBox.selected("Second list item"))
        Env.LogError("Could not set current selection");
		

See also

listbox Overview | listbox.selectedItems

 


© 2003 Lightweight Technologies. All rights reserved.