Cobus Kruger
Cobus Kruger

Reputation: 8615

How to bind a TObjectList in Delphi

I'm trying to figure out how to bind an object list to a list box. It seems all the Embarcadero samples bind to datasets.

It seems that I should use TBindList, but I cannot see how to link it to the TObjectsList. The SourceComponent property requires a component (not a list) and none of the events seem to make sense.

Anyone know if this is possible?

Upvotes: 0

Views: 2260

Answers (1)

aleroot
aleroot

Reputation: 72686

The adapter components TListBindSourceAdapter and TObjectBindSourceAdapter enable LiveBindings with user defined TObjects.

Take a look at this tutorial, it should help .

Upvotes: 2

Related Questions