Board index » delphi » Delphi 2.0 TCollection and TCollectionItem

Delphi 2.0 TCollection and TCollectionItem

Has anyone use the TCollection object or the TCollectionItem?  I can't
get them to work if anyone has a quick example or refer me to some
literature I sure would appreciate it.

Todd

 

Re:Delphi 2.0 TCollection and TCollectionItem


Quote
On Tue, 09 Apr 1996 18:05:53 GMT, sky...@erols.com wrote:
>Has anyone use the TCollection object or the TCollectionItem?  I can't
>get them to work if anyone has a quick example or refer me to some
>literature I sure would appreciate it.

TCollection is a special kind of list class. It stores TCollectionItem
objects, where you define your own subclass of TCollectionItem. What
makes TCollection special is that it has builtin support for storing
TCollection and TCollectionItem objects in a DFM file. Thus, these
classes are ideally suited for a component that contains a variable
number of subcomponents.

In fact, that's what Delphi uses them for: TStatusBar, THeaderControl,
TListView uses TCollections for storing status panels, header
sections, and list columns. If you have the developer or client/server
version, look in the ComCtrls.pas file. If you have the desktop
version, look at ComCtrls.int, where you can at least see the
declarations that show you how TCollection and TCollectionItem are
subclassed.

If you have further, specific questions, post them here.
--
Ray Lischner                              li...@tempest-sw.com
Tempest Software, Corvallis, Oregon, USA  http://www.tempest-sw.com

Other Threads