Forum: GUI-Design mit VCL / FireMonkey / Common Controls
Delphi
by Phoenix,
19. Jul 2007
boah :shock:
((((Sender as TAction).ActionComponent as TMenuItem).Owner as TPopupMenu).PopupComponent as TControl)
Da wird man ja verrückt. Aber es geht. Und es ist sauberer als Zwischenspeichern.
Forum: GUI-Design mit VCL / FireMonkey / Common Controls
Delphi
by Phoenix,
19. Jul 2007
Hi,
man, ich roste echt ein.
Man nehme:
Zwei Controls, ein Popumenu, eine ActionList.
Man definiere eine Action und ein PopupmenuItem. Man hänge die Action an das Menuitem und man hänge das PopupMenu an beide Controls.
In der Action.onExecute ist der Sender immer die auslösende TAction.