townedcollection

How to invoke a component's property editor at design time

…衆ロ難τιáo~ 提交于 2019-12-19 06:20:29
问题 I have created a component derived from TCustomPanel. On that panel I have a published property of a class derived from TOwnedCollection. All is working well and clicking the ellipsis in the object inspector for that property opens the default collection editor where I can manage the TCollectionItems in the list. TMyCustomPanel = class(TCustomPanel) private ... published property MyOwnedCollection: TMyOwnedCollection read GetMyOwnedCollection write SetMyOwnedCollection; end; I would also like

How to invoke a component's property editor at design time

北战南征 提交于 2019-12-01 04:17:53
I have created a component derived from TCustomPanel. On that panel I have a published property of a class derived from TOwnedCollection. All is working well and clicking the ellipsis in the object inspector for that property opens the default collection editor where I can manage the TCollectionItems in the list. TMyCustomPanel = class(TCustomPanel) private ... published property MyOwnedCollection: TMyOwnedCollection read GetMyOwnedCollection write SetMyOwnedCollection; end; I would also like to be able to double-click on the panel at design-time and have the collection editor open up by

Using TOwnedCollection descendant in Delphi

本小妞迷上赌 提交于 2019-11-27 18:40:47
问题 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): TMyCollectionItem; procedure SetItem(Index: Integer; const Value: TMyCollectionItem); public function Add : TMyCollectionItem; property Items[Index: Integer]: