ListBox Interface Reference

ListBox control displays a list of items and allows the user to select one or more items from the list. More...

Inheritance diagram for ListBox:

Inheritance graph
Collaboration diagram for ListBox:

Collaboration graph
List of all members.

Public Member Functions

 ItemFromPoint ([in] USHORT x,[in] USHORT y,[out, retval] LONG *pIndex)
 Retrieves the zero-based index of the item nearest the specified point in the control.

Properties

VARIANT_BOOL RW Selected [[in] LONG Index] []
 Gets or sets the selection state of an item.
LONG R SelCount []
 Gets the total number of selected items in the control.
VARIANT_BOOL RW MultiSelect []
 Specifies that the user can select any number of items.
VARIANT_BOOL RW ExtendedSelect []
 Allows multiple items to be selected by using the SHIFT key, special key combinations or the mouse.
USHORT RW ColumnCount []
 Specifies the columns count for the control.
USHORT RW ColumnWidth []
 Specifies the column width for the control.
ULONG RW ScrollBars []
 Specifies scrollbars of the control.

Detailed Description

ListBox control displays a list of items and allows the user to select one or more items from the list.

When the user changes selection, the OnChange event occur.

See also the method CreateListBox of the Frame.

Example:

o = new ActiveXObject("Scripting.WindowSystemObject")

o.EnableVisualStyles = true

f = o.CreateForm(0,0,0,0)

f.Text = "WSO"
f.ClientWidth = 200
f.ClientHeight = 100
f.CenterControl()

ListBox = f.CreateListBox(10,10,100,80)
with (ListBox)
{
        for (i = 1; i<25; i++)
                Add("Item "+i)
}

f.Show()

o.Run()

Result:

ListBox.jpg


Member Function Documentation

ItemFromPoint ( [in] USHORT  x,
[in] USHORT  y,
[out, retval] LONG *  pIndex 
)

Retrieves the zero-based index of the item nearest the specified point in the control.

Parameters:
x x-coordinate of the point.
y y-coordinate of the point.
Return values:
pIndex index of the item. -1 if item not found.


Property Documentation

USHORT RW ColumnCount

Specifies the columns count for the control.

Default value: "0".

USHORT RW ColumnWidth

Specifies the column width for the control.

VARIANT_BOOL RW ExtendedSelect

Allows multiple items to be selected by using the SHIFT key, special key combinations or the mouse.

VARIANT_BOOL RW MultiSelect

Specifies that the user can select any number of items.

Change item selection each time when the user clicks or double-clicks a item in the control.

ULONG RW ScrollBars

Specifies scrollbars of the control.

This parameter can be a one of the following values:

LONG R SelCount

Gets the total number of selected items in the control.

VARIANT_BOOL RW Selected[[in] LONG Index] (  ) 

Gets or sets the selection state of an item.

Parameters:
Index Specifies the zero-based index of the item.


WSO 1.1 Documentation. Date modified:Wed Aug 12 18:12:48 2015. (C) Veretennikov A. B. 2004-2015