Changing the Delphi Program Tips Font
Almost any GUI element can be used on Windows. When a user hovers the mouse over an item, a small window opens with help text. Is it possible to change hint window font behavior? Of course…
Embarcadero Delphi, that is, Delphi offers an integrated development environment for console, internet, desktop and mobile applications. Delphi's compilers can generate code for Windows NT, Mac OS X, iOS, and Android using its Pascal dialect, Object Pascal.
The environment that comes up when you open Delphi is called IDE. IDE stands for Integrated Development Environment. IDE has many tools and features that will make your work easier while writing programs.
Use this code to change the font, size, and style of the hint text:
unit Unit1 ;
interface
uses
Windows , Messages , SysUtils , Variants , Classes , Graphics , Controls , Forms ,
Dialogs , StdCtrls ;
type
TForm1 = class ( TForm )
Button1 : TButton ;
procedure FormCreate ( Sender : TObject ) ;
end ;
type
TExHint = class ( THintWindow )
public
constructor Create ( AOwner : TComponent ) ; override ;
end ;
var
Form1 : TForm1 ;
implementation
{$R *.dfm}
constructor TExHint . Create ( AOwner : TComponent ) ;
begin
inherited Create ( AOwner ) ;
with Canvas . Font do
begin
Name := 'Verdana' ;
Size := Size + 15 ;
Style := [ fsBold , fsItalic ] ;
end ;
end ;
procedure TForm1 . FormCreate ( Sender : TObject ) ;
begin
HintWindowClass := TExHint ;
end ;
end .