Autor Beitrag
bwolf
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 50



BeitragVerfasst: Di 06.02.07 16:30 
Hi all,

ich hab mehere Forms und ein Datamodul. Auf dem Datamodul ist eine Actionlist mit mehreren Aktionen.
Wenn ich nun auf FormXYZ einen Button drücke, der eine Aktion auf der Actionlist auslößt, würde ich gerne wissen, auf welcher Form der Butto gedrückt wurde.
Geht das irgendwie ?

Danke schomal,
gruß ben
Coder
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1383
Erhaltene Danke: 1

WinXP
D2005 PE
BeitragVerfasst: Di 06.02.07 17:20 
ausblenden Delphi-Quelltext
1:
DasControl.Parent					

Gibt das Elternelement zurück.

MfG
Renegade
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 358

Win XP Pro, Win 7 Beta
BDS 2006
BeitragVerfasst: Di 06.02.07 17:30 
Wenn der Button auf em Form liegt da sollte  if sender is tButton then ShowMessage(tToolbutton(sender).Parent.Name);
helfen.

_________________
Sokrates (468 v.Chr. - 399 v.Chr.)
"Es ist keine Schande, nichts zu wissen, wohl aber, nichts lernen zu wollen."
bwolf Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 50



BeitragVerfasst: Fr 23.02.07 10:26 
Danke für die Anworten.

Das Problem ist allerdings, das der Sender nicht der Button ist, der die Action auslößt, sondern die TAction selber - und deshalb krieg ich net raus, welcher Button diese Aktion ausgelößt hat.