Einzelnen Beitrag anzeigen

Benutzerbild von Stevie
Stevie

Registriert seit: 12. Aug 2003
Ort: Soest
4.008 Beiträge
 
Delphi 10.1 Berlin Enterprise
 
#2

Re: aktive Komponenten anzeigen lassen

  Alt 18. Jun 2004, 12:51
Du musst eine Funktion überschreiben:

Delphi-Quellcode:
interface

type
  TForm1 = class(TForm)
    Label1: TLabel;
    ...
  public
    function SetFocusedControl(Control: TWinControl): Boolean; override;
  end;

implementation

function TForm1.SetFocusedControl(Control: TWinControl): Boolean;
begin
  Result := inherited SetFocusedControl(Control);
  Label1.Caption := Self.ActiveControl.Name;
end;
Stefan
“Simplicity, carried to the extreme, becomes elegance.” Jon Franklin

Delphi Sorcery - DSharp - Spring4D - TestInsight
  Mit Zitat antworten Zitat