When a TAction event fires, the \"Sender\" is always the action itself. Usually that\'s the most useful, but is it somehow possible to find out who triggered the action\'s OnExe
There are situations where the same action should apply to similar controls. The problem with
ShowMessage( (Sender as TAction).ActionComponent.Name );
is that when the action is invoked by a say popup menu, you get the popup menu's name. You could use:
procedure TMyForm.actMyActionExecute(Sender: TObject);
var
LMyControl: TMyControl;
begin
if Screen.ActiveControl.Name = 'MyControl1' then
LMyControl = Sender as TMyControl
else
Exit;
// Use the local variable for whatever needed
end;