![]() |
TAction -> FinComponent klappt nciht richtig ?
Hallo zusammen,
wieso findet er hier nichts:
Delphi-Quellcode:
Was amche ich falsch ?
var
MeineAction: TAction; ... MeineAction := TAction(FindComponent('Action1')); Gruss Holger |
Re: TAction -> FinComponent klappt nciht richtig ?
Existiert die Komponente und ist die aktuelle Form ihr Owner?
|
Re: TAction -> FinComponent klappt nciht richtig ?
Das mit dem Owner war der Hinweis.
Hatte mit:
Delphi-Quellcode:
gearbeitet.
With DM.Actionlist do
begin .... end; So reicht es:
Delphi-Quellcode:
Gruss
With DM do
begin ... end; Holger |
Re: TAction -> FinComponent klappt nciht richtig ?
Muss ich die Actionlist irgendwie refreshen, oder warum übernimmt er dann nciht das enabled = TRUE ?
Gruss Holger |
Re: TAction -> FinComponent klappt nciht richtig ?
Jetzt klappt es. Ich denke man muss wohl erst onExecute eine procedure zuweisen, bevor es klappt.
Gruss Holger |
Re: TAction -> FinComponent klappt nciht richtig ?
Zitat:
genau so ist es. Ohne ein OnExecute sind die Controls welche mit einer TAction verbunden sind immer disabled. |
Alle Zeitangaben in WEZ +1. Es ist jetzt 19:56 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