TCollection is a container for TCollectionItem objects. It is defined in the Classes.pas unit.
Questions tagged [tcollection]
24 questions
1
vote
1 answer
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…

Christopher Chase
- 2,840
- 6
- 36
- 57
1
vote
1 answer
TCollection PropertyEditor with editable Columns
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…

Heinz Z.
- 1,537
- 3
- 14
- 29
1
vote
1 answer
Date/Time Picker as Property Editor in a TCollectionItem descendant
I'm writing a component which requires properties of type Date, Time, and Date/Time. I would like these properties to be visible in the Object Inspector, with an option to use a popup property editor.
I have tried TDate as a published property, and…

Jerry Dodge
- 26,858
- 31
- 155
- 327
1
vote
1 answer
TColumn.FieldName property editor
I'm analyzing the DBGrids.pas unit. There's a TColumn class which have published the FieldName property
property FieldName: String read FFieldName write SetFieldName;
It's declared as a string but in the object inspector it's appear as a editable…

JustMe
- 2,329
- 3
- 23
- 43
1
vote
1 answer
how to change ItemClass of a class inherited from TCollection
I have a class which inherited from TCollection (lets call it "TMyCollection") and I have to inherit a new class from it (lets call it "TMyItems")
Usually we pass the ItemClass type in the constructor of the TCollection but in my case the…

user1512094
- 611
- 2
- 10
- 23
0
votes
1 answer
No reaction when "..." clicked on a TCollectionItem property that represents another TCollection
I've never been in a situation that needed it, and this is the first time I try to have a TCollection as TCollectionItem of another TCollection.
It all compiles fine, but there is no reaction when the three dots behind the TCollectionItem's…

Domus
- 1,263
- 7
- 23
0
votes
0 answers
Delphi Readonly TCollection in designtime
I'm trying to create and register a custom editor for TCollection in Delphi XE5. I tried several things, including inheriting the TCollectionProperty class. I figured it's enough to override the GetColOptions function as follows:
function…

AnselmoMS
- 467
- 3
- 18
0
votes
3 answers
delphi 7: How can I find item of object collection?
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…

TimeIsNear
- 711
- 4
- 19
- 38
0
votes
1 answer
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,…

Jamo
- 3,238
- 6
- 40
- 66