As the title suggest, I don't know how to add item to a multiple column list box. When I do the usual
it only adds to the first column. How do I populate the others?
Columns property has been set to, say, 3. I googled out this issue but none of them return any usable result.
5 Months Ago
Related Article:Multi Column Combo box?
is a Visual Basic 4 / 5 / 6 discussion thread by blocker that has 1 reply, was last updated 1 year ago and has been tagged with the keywords: combo, box, multi, comun, column.
Setting The Listbox to have multiple columns will not work the way you expect it to. Having a Mult-Column listbox will only show both columns, when the length of the first column is full. To illustrate this, start a new project, and drop a listbox on it. Change it's columns to 3, and add this code to form_load:
For I = 0 To 300
As you can see (depending on how "tall" you made the listbox) the first column fills up first, then the second, and third.... so on. In order to do what you want, it will take a bit of crafty programming, using the API. Check this site for further details: http://www.thescarms.com/vbasic/listbox.asp
oh. i tried the loop you posted. it really did populate in multiple columns. more than 3 actually since my box is rather short.
sigh. last time i did in VBA the data source based on query/table, getting it into multiple columns is straightforward. never knew in VB6, with data source being values, is an entirely different story.