Autor Beitrag
Fienix
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 109

Win 2K, Win XP Pro, Win 7
D 5 Pro., D 7 Ent., D 2010 Pro.
BeitragVerfasst: Di 23.05.06 12:00 
In meiner Klasse, abgeleitet von TForm, rufe ich einen Dialog mit ShowModal auf,
Wie bekomm ich das TComponent von der Instanz der klasse heraus damit ich dem Dialog den Owner zuweisen kann?

_________________
Wer sichert ist feige!!
Arno Nym
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 131



BeitragVerfasst: Di 23.05.06 12:12 
häää????
check ich grad nich so wirklich.
gibs da Code zu ?
Ansonten hat doch jede Klasse abgeleitet von TForm und das wiederum von TComponent automatisch eine Funktion "owner". Und prüfen kannst do doch mit "is" bzw. einen Typecast machen mit "as"...
Aber, Ich glaub das Problem must du nochmal besser erklären.

MFG Arno Nym;
MrSaint
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1033
Erhaltene Danke: 1

WinXP Pro SP2
Delphi 6 Prof.
BeitragVerfasst: Di 23.05.06 12:36 
EInen Cast machen :)

ausblenden Delphi-Quelltext
1:
TComponent(Self)					

oder
ausblenden Delphi-Quelltext
1:
(Self as TComponent)					


Je nachdem, was dir lieber ist :)



MrSaint

_________________
"people knew how to write small, efficient programs [...], a skill that has subsequently been lost"
Andrew S. Tanenbaum - Modern Operating Systems
Fienix Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 109

Win 2K, Win XP Pro, Win 7
D 5 Pro., D 7 Ent., D 2010 Pro.
BeitragVerfasst: Di 23.05.06 12:46 
THX MrSaint ! :flehan:

Genau das ist es, den Wald wieder mal vor lauter Bäumen nicht gesehn!
:eyes:

_________________
Wer sichert ist feige!!