Ich habe das mal so gelöst:
Delphi-Quellcode:
For I := 0 to Form.ComponentCount - 1 do
begin
if Form.Components[I] is TDBGrid then
begin
DBGrid := TDBGrid(Form.FindComponent(Form.Components[I].Name));
If (DBGrid.Focused) then Result := Form.Components[I].Name;
end;
end;
Ist der focus das selbe wie activecontrol ?