whats new ¦  programming tips ¦  indy articles ¦  intraweb articles ¦  informations ¦  links ¦  interviews
 misc ¦  tutorials ¦  Add&Win Game

Tips (1548)

Database (90)
Files (137)
Forms (107)
Graphic (116)
IDE (21)
Indy (5)
Internet / LAN (131)
IntraWeb (0)
Math (76)
Misc (127)
Multimedia (45)
Objects/
ActiveX (51)

OpenTools API (3)
Printing (35)
Strings (83)
System (268)
VCL (243)

Top15

Tips sort by
component


Search Tip

Add new Tip

Add&Win Game

Advertising

15 Visitors Online


 
...change a Hint's Font ?
Autor: Simon Grossenbacher
Homepage: http://www.swissdelphicenter.ch
[ Print tip ]  

Tip Rating (12):  
     




{
  When the application displays a Help Hint,
  it creates an instance of HintWindowClass to represent
  the window used for displaying the hint.
  Applications can customize this window by creating a
  descendant of THintWindow and assigning it to the
  HintWindowClass variable at application startup.
}

type
  
TMyHintWindow = class(THintWindow)
    constructor Create(AOwner: TComponent); override;
  end;


implementation

{....}

constructor TMyHintWindow.Create(AOwner: TComponent);
begin
  inherited 
Create(AOwner);
  with Canvas.Font do
  begin
    
Name := 'Arial';
    Size := Size + 5;
    Style := [fsBold];
  end;
end;

procedure TForm2.FormCreate(Sender: TObject);
begin
  
HintWindowClass := TMyHintWindow;
  Application.ShowHint := False;
  Application.ShowHint := True;
end;


 

Rate this tip:

poor
very good


Copyright © by SwissDelphiCenter.ch
All trademarks are the sole property of their respective owners