From Xojo Documentation

You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!

Property (As Integer )
aDesktopListBox.ColumnCount = newIntegerValue
IntegerValue = aDesktopListBox.ColumnCount

New in 2021r3

Supported for all project types and targets.

The number of columns the ListBox contains. The maximum number of columns is 256.


Setting this value higher than 255, will result in the ColumnCount being set to 256.


Adding a column to ListBox1 and setting the widths of the columns to 50 and 65 pixels, respectively:

ListBox1.ColumnCount = 2
ListBox1.ColumnWidths = "50,65"

Setting the number of columns of ListBox1 to three and setting the widths of the columns to 60%, 20% and 20% respectively:

ListBox1.ColumnCount = 3
ListBox1.ColumnWidths = "60%,20%,20%"