AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

[XE10] Designer, TCollectionItem

Ein Thema von 4dk2 · begonnen am 2. Mai 2016
Antwort Antwort
4dk2

Registriert seit: 4. Sep 2007
176 Beiträge
 
#1

[XE10] Designer, TCollectionItem

  Alt 2. Mai 2016, 14:10
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:
  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;
in den Funktionen vom TSimpleObject_PropertyEditor hab ich überall nen showmessage reingepackt, aber wird nie ausgeführt?

Jemand ne Idee?
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 22:50 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz