Columns Property (AListBox)

Returns or sets whether the object scrolls vertically or horizontally and how the items in the columns are displayed.

Syntax

Object.Columns [ = nColumns ]

The Columns property syntax has the following parts:

 

Name

Type

Description

Object

AListBox

AListBox control

nColumns

Short

An integer specifying the number of columns in the listbox

Comments

If it scrolls horizontally, the Columns property determines how many columns are displayed.

If the value is greater than 0, then the items are arranged in snaking columns, filling the first column, then the second column, and so on. The ListBox scrolls horizontally and displays the specified number of columns. at run time only the number of column can be changed (0 can't be changed and greater than 0 can't be changed to 0). Valid values are 0 to 256. The default value is 0 (scroll vertically).

Example

The following statement changes the number of columns in the AListBox to three:

lb1.Columns=3

Applies to

AListBox

See Also

DisableNoScroll