tcollection

Saving vcl objects references in dephi with Tcollection

不打扰是莪最后的温柔 提交于 2019-12-22 18:26:36
问题 I am using delphi 2009 and VCL components. I have created a collection called TStreets made of items TStreet which has just two private fields. Now I need to add to Tstreet class another field/property to keep track (by using reference) of other objects of class TMyObject. An example: let's assume that TStreet collection contains five elements and ten objects (TMyObject) exists in my application at run-time. Each objects of TMyObject can belong to only one TStreet so I need to save for each

Delphi TCollection - Possible to prevent changing items in run-time?

橙三吉。 提交于 2019-12-11 02:47:08
问题 Using delphi 7, I have a TCollection/TCollectionItem set of descendents. They are intended to be set up in Design-time only, and should never be modified in Run-time. How can I do this? Design-time should always allow whatever edits are needed, but in Run-time, I don't want to be able to Add, Remove, or Re-index any of the items in the collection. The properties of each of those items, yes, I do want them to be enabled. But changing the actual items around shall only be in design-time. 回答1:

Saving vcl objects references in dephi with Tcollection

纵饮孤独 提交于 2019-12-06 13:42:25
I am using delphi 2009 and VCL components. I have created a collection called TStreets made of items TStreet which has just two private fields. Now I need to add to Tstreet class another field/property to keep track (by using reference) of other objects of class TMyObject. An example: let's assume that TStreet collection contains five elements and ten objects (TMyObject) exists in my application at run-time. Each objects of TMyObject can belong to only one TStreet so I need to save for each TStreet all reference of objects and then be able to move one or more object reference from one TStreet

Creating a component with named sub-components?

二次信任 提交于 2019-11-27 04:34:28
I need to know the basics behind making a component produce and manage sub-components. I originally tried this by creating a TCollection , and tried to put a name on each TCollectionItem . But I learned it's not that easy as I had hoped. So now I am going to start this project from scratch again, and I'd like to get it right this time. These sub-components are not visual components, and should not have any display or window, just based off of TComponent . The main component holding these sub-components will also be based off of TComponent . So nothing here is visual at all, and I don't want a

Creating a component with named sub-components?

寵の児 提交于 2019-11-26 11:15:28
问题 I need to know the basics behind making a component produce and manage sub-components. I originally tried this by creating a TCollection , and tried to put a name on each TCollectionItem . But I learned it\'s not that easy as I had hoped. So now I am going to start this project from scratch again, and I\'d like to get it right this time. These sub-components are not visual components, and should not have any display or window, just based off of TComponent . The main component holding these