Forum > Beginners

Get class fields names and assign to record fields

<< < (2/2)

from what I can tell in your post, you are looking for the use of TCollection that manages
a TCollectionItem.

 TCollectionItem has an ID, DisplayName and a few other things in it.

you base your classes from a TCollectionItem

So with that,

    TMyClass = Class(TCollectionItem)
       your added stuff,

 And the collection.
TMyCollection := TCollection.Create(TMyClass);

 From there, as you create new items you can add them to the list..


 It may not be exactly what you want but I bet it's close.

 The classes can be found in the LCL help file and online.


[0] Message Index

[*] Previous page

Go to full version