omsec
asked on
Catch Focus of Edit
Is is possible receive some Notification when an EditBox is activated at run-time, either thru a Mouse Click of it or using the Tab Key ?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
procedure TForm1.FormCreate(Sender: TObject);
begin
Screen.OnActiveControlChan
end;
procedure TForm1.ColorControl(Sender
var
I : Integer;
Forma: Tform1;
begin
for I:= 0 to Forma.ControlCount -1 do
begin
if (Forma.Controls[I] is TWinControl) then
begin
if (Forma.Controls[I] as TWinControl).Focused then
TEdit(Forma.Components[I])
else
TEdit(Forma.Components[I])
end;
end;
end;
Any control wich is focused is colored in clWindow...