 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
StuartDAC Guest
|
Posted: Sat Feb 14, 2004 4:53 pm Post subject: Storing custom values as "objects" in combobox |
|
|
I have a combobox that is displaying strings, but I want to asociate an id with
each item (the text comes from a language file, so I only know the order not
the text). I use Items.AddObject, but cannot read the values back. A quick look
into the Delphi code seems to suggest that the PutObject is empty and therefor
doesn't work as documented. I assume I must be doing something wrong. My code
looks like this:
oCombo.Items.AddObject(sLine1, TObject(100));
and to retriece it:
iID:= Items.IndexOfObject(TObject(100))
But, this causes an out of bounds error.
Can anyone help?
Thanks!
-Stuart
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|