Autor Beitrag
NightHawk
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 18



BeitragVerfasst: Do 06.02.03 00:15 
Hi,

Es gibt doch seit der Version 5 von Delphi die Compo TLabeledEdit. Weiß jemand, wie die das "TLabel" als Sub-Komponente in die Properties der Klasse TEdit bekommen haben, sodaß man es direkt im Objekt-Inspektor editieren kann?

Ich würde gerne wissen, wie ich ein TLabel oder auch eine andere Unter-Komponente einer Klasse direkt im Objekt-Inspektor des "Owners" editieren kann, ohne über irgendwelche Extra-Properties wie z.B. LabelColor oder LabelFont darauf zugreifen zu müssen.

NightHawk

_________________
Delphi - Die Sprache der Engel
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Do 06.02.03 01:51 
Gibt es erst ab D6.
AndyB
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1173
Erhaltene Danke: 14


RAD Studio XE2
BeitragVerfasst: Do 06.02.03 07:15 
Und da läuft das ganze automatisch ab. Dort reicht ein
ausblenden Quelltext
1:
2:
published
  property Button: TButton read FButton;

_________________
Ist Zeit wirklich Geld?
Ice
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 114



BeitragVerfasst: Do 06.02.03 10:06 
Ich würde sagen du müsstest dir eine neue Komponente erstellen, die dann das was du mit dabei haben willst z.B. ein Label einfach in ihrer Create methode mit aufruft.

mfg Ice
NightHawk Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 18



BeitragVerfasst: Do 06.02.03 17:44 
Hallo,

Danke für die schnelle Antwort. Habe den richigen Code bereits dringehabt. Das Problem war nur, dass ich bei der Property-anweisung auch die Option "read" hatte, wodurch meine Hauptkomponente die Sub nicht erkannt hat und das Speichern und eine weitere Sub-Kompo zugewiesen bekommen wollte...

ausblenden Quelltext
1:
2:
published
  property TEditLabel: TLabel read FEditLabel write FEditLabel;


Jetzt habe ich die write Anweisung einfach weggelassen und es funktioniert..

ausblenden Quelltext
1:
2:
published
  property TEditLabel: TLabel read FEditLabel;


Aber irgendwas ist bei meiner Kompo doch anders als bei der TLabeledEdit. Dort steht im Objekt-Inspektor als Komponame.SubLabel. Bei mir steht nur Komponame. und nichts weiter....

Ist das OK ?

NightHawk

_________________
Delphi - Die Sprache der Engel
hansa
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3079
Erhaltene Danke: 9



BeitragVerfasst: Sa 08.02.03 08:55 
Kann mir einer etwas mehr Quelltext rausrücken, brauche so was ähnliches, nur für DBedits und kriegs nicht hin. Wo muß denn das TeditLabel und das Feditlabel deklariert werden ?

Gruß
Hansa