Hints with other fonts
Define our descendant
of ThintWindow , we put this code in the implementation of the form :
Implementation
{$R *.DFM}
Type
TNewHintFont = Class ( THintWindow )
Constructor Create ( AOwner : TComponent ) ; Override ;
End ;
Constructor TNewHintFont.Create
( AOwner : TComponent ) ;
Begin
Inherited
Create ( Aowner ) ;
Canvas.Font.Name := 'Times New Roman' ;
Canvas.Font.Size := 18 ;
End ;
We assign our TNewHintFont to the HintWindowClass of
our form. We will make it in the event OnCreate of the form :
Procedure TForm1.FormCreate (
Sender : TObject ) ;
Begin
Application.ShowHint := False ;
HintWindowClass := TNewHintFont ;
Application.ShowHint := True ;
End ;