Hints -- the little windows that are shown when moving the mouse cursor over a component
or a menu item -- can be customized. You can change their color, their timing, and
even show more than one line of text.
Color and timing of hints
In the OnCreate event handler of the main form of your application, write
procedure TForm1.FormCreate(Sender: TObject);
Application.HintColor := clAqua; // color of your choice
Application.HintPause := 250; // 250 mSec before hint is shown
Application.HintHidePause := 3000; // hint disappears after 3 secs
More lines in a Hint
If you want to display more than one line in the Hint of a component, for example
- In the Object Inspector,
don't put anything in Button1's Hint property.
- Don't forget to set its ShowHint property to
In the FormCreate event handler of the form that contains Button1, add this
Button1.Hint := 'First line' + #13 + 'Second line' + #13 + 'Third line';
// ...add more lines as desired...
Members of the DelphiLand Club receive our Crash
Course Delphi, plus the fully commented source code of numerous projects, plus guaranteed answers from our Delphi
Forum. Membership is for life!
Club Membership DC Library Forum Forum
Archives Crash Course Delphi Tips Source