OlkListBox Members (Outlook)

A control that supports displaying a scrollable list of items.

Methods

Name

Description

AddItem

Adds an item to the list, optionally specifying an index for the new item to appear in the list.

Clear

Removes all objects from the list.

Copy

Copies the current selection in the drop-down list to the clipboard.

GetItem

Obtains a String that represents an item at the specified location in the list.

GetSelected

Returns a Boolean that indicates if the indexed item is currently selected.

RemoveItem

Removes the specified item from the list.

SetItem

Sets the item at the specified location in the list to the specified value.

SetSelected

Sets the selected state of an item at the specified location in the list to the given Selected value.

Properties

Name

Description

BackColor

Returns or sets a Long that indicates the background color of the control. Read/write.

BorderStyle

Returns or sets an OlBorderStyle constant that defines the style of the border around the control. Read/write.

Enabled

Returns or sets a Boolean that indicates if the control is allowed to function. Read/write.

Font

Returns the font used to render the text inside the control. Read-only.

ForeColor

Returns or sets a Long that indicates the foreground color of the control. Read/write.

ListCount

Returns a Long that specifies the number of elements in the drop-down list of the list box control. Read-only.

ListIndex

Reurns or sets a Long that indicates the location of the currently selected element in the list of the combo box control. Read/write.

Locked

Returns or sets a Boolean that specifies whether or not the control is locked from being changed. Read/write.

MatchEntry

Returns or sets an olMatchEntry constant that indicates how the control searches its list as the user types. Read/write.

MouseIcon

Returns or sets a custom picture to the mouse cursor for this control. Read/write.

MousePointer

Returns or sets an OlMousePointer constant that specifies the type of pointer displayed when the user positions the mouse over the control. Read/write.

MultiSelect

Returns or sets an OlMultiSelect constant that specifies the range of items that can be selected in the list box control. Read/write.

Text

Returns or sets a String that is the text displayed in the control. Read/write.

TextAlign

Returns or sets an OlTextAlign constant that specifies how text is aligned in the control. Read/write.

TopIndex

Returns or sets a Long that represents the index of the item at the top of the displayed portion of the list. Read/write.

Value

Returns or sets a Variant that represents the content selected in the list displayed by the control. Read/write.

Events

Name

Description

AfterUpdate

Occurs after the data in the control has been changed through the user interface.

BeforeUpdate

Occurs when the data in the control is changed through the user interface and is about to be saved to the item.

Change

Occurs when the selection in the list displayed by the control changes

Click

Occurs when the user clicks inside the control.

DoubleClick

Occurs when the user double-clicks inside the control.

Enter

Occurs when the control receives focus, immediately after the previous control's Exit event.

Exit

Occurs just after the focus passes from this control to another control on the same form.

KeyDown

Occurs when a user presses a key.

KeyPress

Occurs when the user presses an ANSI key.

KeyUp

Occurs when the user releases a key.

MouseDown

Occurs when the user presses a mouse button on the control.

MouseMove

Occurs after a mouse movement has been registered over the control.

MouseUp

Occurs after the user releases a mouse button that has been pressed on the control.