>Niall wrote:
>> I'm trying to re-write on of my programs written in VB,
>> to Delphi but I'm having trouble converting some of my
>> code to it's Delphi equivalent.
>> Basically I'm trying to fill a ListBox with data and then
>> allow the end user to manipulate that data. (eg. If the
>> program is a phone book, I load the names into the ListBox.
>> Then when the user selects a name, the corresponding data is
>> retrieved.) The problem is that the ListBox is sorted. So
>> the position of an item in the ListBox may not be it's actual
>> position.
>> In VB, as I load the ListBox I can place the actual position
>> of the item into the List1.ItemData index. Then regardless
>> of the items position In the ListBox, I always know its actual
>> position.
>> In VB the code looks something like this;
>> '//fill the list box with data
>> For S = 1 To RecordCount
>> Get #1, S, MyData
>> List1.AddItem MyData
>> '//the following line is added to support mapping
>> List1.ItemData(List1.NewIndex) = S
>> Next S
>> If you understand my question and can help me, I'd appreciate
>> it very much.
>> Thanks,
>> Niall.
>> --
>> ------------------------------------------------------
>> e-mail nwils...@cairns.net.au
>> ------------------------------------------------------
>> please remove the * before using.
>If sorted listbox bothers you, you can turn sorted property off. Does it
>help?