Board index » delphi » Font in Hints

Font in Hints

Is there anyway to alter the basic font and size in the Hints.
I would like my Hints to stand out more
I am using D1

Regards and thanks

Einar

 

Re:Font in Hints


I don't know a way of changing the font and size, but you can change the
colour using Application.HintColor.

--
Mark Pritchard

ei...@netspace.net.au wrote in article
<NEWTNews.22260.842506540.ei...@einar.netspace.net.au>...

Quote

> Is there anyway to alter the basic font and size in the Hints.
> I would like my Hints to stand out more
> I am using D1

Re:Font in Hints


Quote
Mark Pritchard wrote:

> I don't know a way of changing the font and size, but you can change the
> colour using Application.HintColor.

> --
> Mark Pritchard

> ei...@netspace.net.au wrote in article
> <NEWTNews.22260.842506540.ei...@einar.netspace.net.au>...

> > Is there anyway to alter the basic font and size in the Hints.
> > I would like my Hints to stand out more
> > I am using D1

In the Browser I found a class called THintWindow and it has a public
property Canvas which has the Font property.

Is it as simple as creating your own Create procedure to override the
source such as

{ THintWindow }

constructor THintWindow.Create(AOwner: TComponent); Override;
begin
  inherited Create(AOwner);
  Color := MyColor;
  with Canvas do
  begin
    Font.Name := MyFont;
    Font.Size := MySize;
    Brush.Style := MyBrush;
  end;
end;

Am I on a close track?

Dave Joyce

Re:Font in Hints


Quote
On Wed, 11 Sep 96 22:33:34 PDT, ei...@netspace.net.au wrote:
>Is there anyway to alter the basic font and size in the Hints.
>I would like my Hints to stand out more
>I am using D1

You can define your own hint window class. I suggest deriving your
class from THintWindow, and setting the desired font in the hint
window's Canvas. Assign your class to HintWindowClass. To force the
Application object to recognize your hint window class, toggle its
ShowHint property to False and back to True.

There is information in the help files, but it's kind of sketchy.
--
Ray Lischner, Author of Secrets of Delphi 2 (Waite Group Press)
Tempest Software, Corvallis, Oregon, USA  http://www.tempest-sw.com

Re:Font in Hints


Quote
ei...@netspace.net.au wrote:
>Is there anyway to alter the basic font and size in the Hints.
>I would like my Hints to stand out more
>I am using D1
>Regards and thanks
>Einar

Hi Einar,

This is a quick and dirty way to change the font of the hints.
The searching for the THintWindow is nog very nice. Anybody knows a
better way to do this ?

procedure TForm1.Button1Click(Sender: TObject);
var c:TComponent;
      i:integer;
          t:=THintWindow;
begin
     for i:=0 to application.componentcount-1 do
     begin
          if application.components[i] is THintwindow then
          begin
               t:=Thintwindow(application.components[i]);
               t.canvas.font.size:=15;
               t.canvas.font.color:=clWhite;
          end;
     end;
end;

Other Threads