tags:

views:

98

answers:

1

Is there a way in Delphi to disallow the form to focus on any of its components but not disabling those components? I tried Self.SetFocus on FormActivate event of the form but the program says that it cannot focus on a disabled component.

+7  A: 

Use the following OnActivate event handler:

procedure TForm1.FormActivate(Sender: TObject);
begin
  ActiveControl:= nil;
end;
Serg
ok solved, thanks Serg :)
rajeem_cariazo
@rajeem_cariazo; So set this answer as your accepted answer.
SimaWB