Returns or sets whether the object scrolls vertically or horizontally and how the items in the columns are displayed.
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 |
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).
The following statement changes the number of columns in the AListBox to three:
lb1.Columns=3