Posted by Gregory on July 31, 2007
In Reply to Adding/Retreiving values from multi column ListBox posted by Warwick Weston Wright on July 25, 2007: I painstakingly searched all the properties/methods of the standard TListBox for a way to add/retreive values from a standard MULTI COLUMN TListBox. I couldn't find a way of doing this. What are the colums actually for; if not to add/retrieve values. In the end I gave up and used a StringGrid. I'm aware that you can use the tab sequence (^I), but thats not the same is there some kind of TString delimeter sequence or can it be done at all, or maybe it's just a conspiracy, in that the colums are just for show.
Property "Columns" tells in how many parts listbox must be divided horizontally, it is only used at displaying time. ListBox does not have internal columns for string items, you can only access *one* sequential list of items, numbered from 0 to number_of_items-1.
It can not be done adding/retrieving values from individual columns, because internally there are no columns! So, better use StringGrid or something similar with *real* columns :)