1. Home
  2. Computing & Technology
  3. Delphi Programming

ToolTip font hint properties

By , About.com Guide

Here's how to change the font in ToolTip property of Delphi controls (Hint box) :

~~~~~~~~~~~~~~~~~~~~~~~~~
Type
  TMyHintWindow = Class (THintWindow)
   Constructor Create (AOwner: TComponent) ; override ;
  end;

Constructor TMyHintWindow.Create(AOwner:TComponent) ;
begin
  Inherited Create (AOwner) ;
  Canvas.Font.Name := 'Courier New' ;
  Canvas.Font.Size := 72;
end;

procedure TForm1.FormCreate(Sender: TObject) ;
begin
  Application.ShowHint := false;
  HintWindowClass := TMyHintWindow;
  Application.ShowHint := True;
end;
~~~~~~~~~~~~~~~~~~~~~~~~~

Delphi tips navigator:
» Date/Time and other International settings
« Reading a directory content

Explore Delphi Programming
About.com Special Features

The Best Web Trends of the Decade

A look back at the best innovations, ideas and technologies over the last 10 years, More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. Delphi Programming
  4. Coding Delphi Applications
  5. Delphi Tips and Tricks
  6. 1999 Delphi Tips
  7. ToolTip font hint properties

©2010 About.com, a part of The New York Times Company.

All rights reserved.