Board index » delphi » Add item and Listbox

Add item and Listbox

Properly very simple, and I know I properly could use an array BUT
there must be a  better aproce:

I have a Listbox

I add my items from an SQL statement, in the table my records
have a uniq ID,  so I wich to store this ID with the
listbox.items.absoluteindex

there must be someway to link a Index of my own to the index in the
listbox....

Maybe its a silly question, but its been borring me for some time now,

Thanks, Troels

 

Re:Add item and Listbox


Troels,
   Try the TListBox.Items.Objects array which is an array of pointer.
You can store a pointer, integer, object to this array.  You use the
 TListBox.Items.AddObject() method.

 --- x
==============================
Xavier Pacheco (TeamB)
xav...@xapware.com

Sorry but TeamB cannot answer support
questions received via email.

Re:Add item and Listbox


Xavier

Could you give me a quick example of that.  I'm not sure where to
start.

Mike

On Tue, 10 Feb 1998 15:49:33 GMT, xav...@xap.cnchost.com (Xavier

Quote
Pacheco (TeamB)) wrote:
>Troels,
>   Try the TListBox.Items.Objects array which is an array of pointer.
>You can store a pointer, integer, object to this array.  You use the
> TListBox.Items.AddObject() method.

> --- x
>==============================
>Xavier Pacheco (TeamB)
>xav...@xapware.com

>Sorry but TeamB cannot answer support
>questions received via email.

*********************

Michael S. Downey
Prophet Technologies
mike.nos...@ProphetTechnologies.com

Other Threads