List Info

Thread: Formatting hints on the fly




Formatting hints on the fly
country flaguser name
United States
2007-06-03 07:49:59

Hello all:

Many of the fly-over hints for my application are created based on the
context of the screen. I held off formatting them because I thought
there was a way to format them on the fly using the Application.OnHint
event and the Application.Hint property. Unfortunately, when I got
ready to write the formatting code, I found that the Application.Hint
property appears to be read-only. Is there an elegant way to format
(mainly line-wrap) hints at run time? Are there any interesting 3rd
party hint VCLs that make it easier to work with hints.

Thanks in advance.
jamie

__._,_.___
.

__,_._,___
Re: Formatting hints on the fly
country flaguser name
United Kingdom
2007-06-03 08:53:07

Hi Jamie,

> I found that the Application.Hint property appears
> to be read-only.

Why not use the Hint property for each control?

They are definitely not read-only (in D5), and can be formatted
for line wrapping:

my_control.Hint:='testing'+#13+'wrapped line';

Make sure you change ShowHint to True.

For more complex mouse-overs, use OnMouseMove on a control
to display a TPanel (or whatever you want) just below the control.
Use OnMouseMove on the form (or a timer) to hide it again.

regards,

Martin.

__._,_.___
.

__,_._,___
Re: Formatting hints on the fly
country flaguser name
United States
2007-06-03 09:47:31

--- In delphi-en%40yahoogroups.com">delphi-enyahoogroups.com, "Jamie L. Mitchell&quot; <jamiemi...>
wrote:
>
&gt; Hello all:
>;
> Many of the fly-over hints for my application are created based on the
> context of the screen. I held off formatting them because I thought
> there was a way to format them on the fly using the Application.OnHint
> event and the Application.Hint property. Unfortunately, when I got
> ready to write the formatting code, I found that the Application.Hint
&gt; property appears to be read-only. Is there an elegant way to format
&gt; (mainly line-wrap) hints at run time? Are there any interesting 3rd
> party hint VCLs that make it easier to work with hints.
&gt;
> Thanks in advance.
> jamie
&gt;

There are far better alternatives than using Delphi's Application.Hint

Check out balloon tips examples here:
http://www.swissdelphicenter.ch/en/showcode.php?id=1587
and here:
http://www.delphipages.com/news/detaildocs.cfm?ID=90

Googling tooltips&#43;Delphi might find you even more info, but the above
two examples were enough for me to start using them in my programs.

Ian.

__._,_.___
.

__,_._,___
[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )