tcollection

Using TCollection in Delphi

I'm trying to create a custom component with a collection property. However if I try to open the collection editor during design time by clicking "..." button in object inspector, nothing happens. What I am missing? Here's my TCollection descendant: TMyCollection = class(TOwnedCollection) private function GetItem(Index: Integer...

Using TCollection with an already-defined class

(Note: This is somewhat related to my last question). I am new to using TCollection in Delphi, and am still wrapping my head around the various ways to handle one-to-many class/property-item relationships. Exploring TCollection and TCollectionItem, I ran into a couple questions: 1) Is it possible to use TCollection or TOwnedCollectio...

TCollection PropertyEditor with editable Columns

Hello, for my own TCollection descendant I want to extend the collection property editor. I want to see more columns for other properties of my TCollectionItem. And I am a lucky because it is pretty easy. The only thing I want to do was to override these three methods TAttributeList = class(TOwnedCollection) private ... protected f...

delphi TCollection count not increasing after Add

i have the types TNotifyReply = class(TCollectionItem) TNotifyReplylist = class(TOwnedCollection) NotifyReplylist := TNotifyReplylist.Create(self, TNotifyReply); After calling this function (Any number of times), Count it still zero function TNotifyReplylist.addItem: TNotifyReply; begin Result := inherited Add as TNotifyReply; ...

delphi 7: How can I find item of object collection?

Hello, how can I find by name and get the Item in a collection of object ? procedure TfoMain.InitForm; begin // Liste des produits de la pharmacie 1 FListeDispoProduit := TListeDispoProduit.Create(TProduit); with (FListeDispoProduit) do begin with TProduit(Add) do begin Name := ...

return TCollection or array of objects from Dll

I tried to return from dll function my own object (derived from TCollection). I used FastMemoryManager, but without success... So I tried to return dynamic array of some objects. Length of the array of set of course in dll function. It works realtive good, but allocated memory is not freed. (I measure with Windows tarsk manager). Is th...

Is it possible? TCollection descendant to implement storage of TPanel containers with arbitrary content

I'm new to component development in Delphi, therefore want to know, is it possible to implement my task at all. I need to create a visual component (user control) based on TScrollBox, which will represent a bunch of TPanel, all that panels will be aligned as "Top" inside that TScrollBox and can have different Height. It has to act as TC...

Recursive read of TCollection

Hi, I'm very bad with recursion, never used it before. I know the theory of it .. not that that helps :)) For my problem i have a structure of TCollection that contains TCollection and TCollectionItem etc .. I have to write a recursion function that will read all my TCollectionItems. Here is graphical view: TCollection->TCollectionItem...