How to change default hint color and timeouts

Normally, you can just turn hints on or off using property ShowHint on almost every visual component. But what if you want to change the default system color of hint “bubble”? And what if you want to change the default pause, before the hint shows? And hide pause? Everything is very simple.

All the secret is inside the object TApplication. It’s not an “visual component”, it’s not accessible via Object Inspector and therefore many beginers just don’t know about its existence.

HintColor

Changing appropriate properties of object TApplication, you can easily change default hint Color, default hint pause and hide pause. Just put this code to OnCreate event of main form of your application:

procedure TForm1.FormCreate(Sender: TObject);
begin
Application.HintColor := clLime;
Application.HintPause := 2000;
Application.HintHidePause := 5000;
end;

You can change these settings wherever you want inside your application dynamically(not just inside OnCreate event), but try not to confuse users by changing it too frequently. Better idea is to offer to users an option to select the color a timeouts by themselves.