Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Sonstige Fragen zu Delphi (https://www.delphipraxis.net/19-sonstige-fragen-zu-delphi/)
-   -   Delphi Tcollection, Objectinspector (https://www.delphipraxis.net/108993-tcollection-objectinspector.html)

hermannhass 22. Feb 2008 14:15


Tcollection, Objectinspector
 
Hallo
Ich habe eine Komponente, die als Property eine tCollection enthält.
über den OI sehe ich die einzelnen TCollectionItem's wunderbar.
nun möchte eine ich eine zweite property, in der ich ein Tcollectionietm auswähle.
Beispiel wie beim Dbedit:
Ich wähle einen Datasource(in meinem Fall die Tcollection)
und danach den Feldnamen(eine Stringeigenschaft "caption" meines Tcollectionitems).

Frage:
wie bekomme ich im Objectinspektor(nach zuweisung der Tcollection) in einem anderen Feld eine Auswahl(Listbox) meiner tcollectionitems.Caption?

Oder anders:
Wie kann ich im OI aus einer Tcollection einen Eintrag(Item) für eine Komponente selectieren?

sx2008 23. Feb 2008 01:27

Re: Tcollection, Objectinspector
 
Du musst einen Property Editor schreiben und in einem Design Time Package installieren.
http://www.drbob42.com/delphi/property.htm

hermannhass 23. Feb 2008 09:41

Re: Tcollection, Objectinspector
 
ok,
danke, habe ich gemacht.
ich dachte, für so standartkomponenten gäbe es was fertiges.
habe mir jetzt ne "selectCollectionProperty" gebastelt.
Gruß aus der Sonne
Hermann


Alle Zeitangaben in WEZ +1. Es ist jetzt 20:22 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