Hints -- the little windows that are shown when moving the mouse cursor over
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
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...
DC Library Forum Crash Course Delphi Tips Source