listbox Overview


This object wraps the Windows listbox control.

A VARIANT item is used by most methods to identify items in the listbox:

Example

// Test newItem and findItem with regular expression
    ListBox.newItem("Fresh list item");
    if (ListBox.findItem("\\Fresh .*") == -1)
        Env.LogError("Could not find the new item");
		

Methods

newItem Inserts a new item in the list and returns its zero-based index.
deleteItem Removes an item from the list.
resetContent Removes all items from the list.

Properties

count Returns the number of items in the list.
item Returns the text of the specified item.
itemData Gets/set the user data associated with the specified item.
findItem Returns the zero-based index of the specified item, or -1 if none exists.
selected Gets/sets the selection on an item (or all items) in the listbox.
selectedItems Returns a collection of the selected items in a multiple selection listbox, or the index of the current selection in a single selection list.

 


© 2003 Lightweight Technologies. All rights reserved.