![]() |
[XE10] Designer, TCollectionItem
Hallo zusammen,
irgendwie bekomme ich bei mir nicht nen PropertyEditor für abgeleitet von TCollectionItem ans Laufen, oder muss ich mir nen eigenen Listen-Designer bauen?
Delphi-Quellcode:
in den Funktionen vom TSimpleObject_PropertyEditor hab ich überall nen showmessage reingepackt, aber wird nie ausgeführt?:?::roll:
TSimpleCollectionItem=class(TCollectionItem)
private FNameXYZ:string; published property NameXYZ:string read FNameXYZ write FNameXYZ; end; TSimpleCollectionList=class(TOwnedCollection) private protected function GetItem(Index: integer): TSimpleCollectionItem; procedure SetItem(index: integer; Value: TSimpleCollectionItem); public function Add: TSimpleCollectionItem; constructor Create(AOwner: TPersistent); public property Items[index: integer]: TSimpleCollectionItem read GetItem write SetItem; end; TSimpleCollectionComp=class(TComponent) private FItems:TSimpleCollectionList; FSingleItem: TCollectionItem; public constructor Create(AOwner: TComponent); override; destructor Destroy; override; published property Items: TSimpleCollectionList read FItems write FItems; property SingleItem:TCollectionItem read FSingleItem write FSingleItem; end; type TSimpleCollection_PropertyEditor = class(TClassProperty) public procedure GetProperties(Proc: TGetPropProc); override; procedure Edit; override; function GetAttributes: TPropertyAttributes; override; constructor Create(const ADesigner: IDesigner; APropCount: Integer); override; end; .... procedure Register; begin RegisterComponents('SimpleCollection', [TSimpleCollectionComp]); RegisterPropertyEditor(TypeInfo(TSimpleCollectionItem),TSimpleCollectionComp,'',TSimpleCollection_PropertyEditor); end; Jemand ne Idee? |
Alle Zeitangaben in WEZ +1. Es ist jetzt 00:58 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz