Does anyone know how to reference a particular column in a list box control and then add stuff to it.
I was looking forward to something like this
Me.lstMylist.Columns("ColumnName").Add
Printable View
Does anyone know how to reference a particular column in a list box control and then add stuff to it.
I was looking forward to something like this
Me.lstMylist.Columns("ColumnName").Add
ListBoxes don't have columns. They contain a simple list of items. If you want columns then use a ListView or a DataGridView.
ListBoxes CAN have columns... just not the same way as a ListView or DataGridView does. They have a MultiColumn property which can be set to true.
However it still only contains 1 single listing of data, it just listes them in multiple columns instead of a single column. Similar to the way a listview behaves in list mode instead of details mode.
So if you are actually using a listbox setup for multicolumn, then it still is just 1 single set of data. You probably want to be using one of the 2 controls John mentioned above.
it is possible to get a multicolumn effect by using tabs in your listbox