Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Using THintWindow to display other messages...

512 views
Skip to first unread message

Neal

unread,
May 16, 2000, 3:00:00 AM5/16/00
to
I have an application that does not use the Hint property on any of it's
fields. I would like to use the little yellow Hint windows (on each field)
to instead display error messages. Here are the things I want to do that
THintWindow does not already do:

1. Display Hints on all visible fields, simultaneously and regardless of
where the mouse cursor is.
2. Display Hints with white text and red backgrounds.

How can I accomplish #1 and #2?

Thanks,

Neal

Peter Below (TeamB)

unread,
May 16, 2000, 3:00:00 AM5/16/00
to

You can create and manage your own instances of THintWindow, or a descendent
thereof. Brian Long had articles on this subject in The Delphi Magazine,
issues 16 (December 1996, "HInts with Attitude") and 43 (March 1999,
"Tooltips Under Your Control"). Go to www.itecuk.com/delmag and download the
companion disks for these issues for the code.

Peter Below (TeamB) 10011...@compuserve.com)
No e-mail responses, please, unless explicitly requested!


Neal

unread,
May 16, 2000, 3:00:00 AM5/16/00
to
Peter,

I took a look at the website, and the Conpanion Disk for that issues (or any
issue prior to 1997) is not available for download.

Dead End.


"Peter Below (TeamB)" <10011...@compuXXserve.com> wrote in message
news:VA.000050f...@antispam.compuserve.com...

Peter Below (TeamB)

unread,
May 17, 2000, 3:00:00 AM5/17/00
to
In article <3921b9d1@dnews>, Neal wrote:
> I took a look at the website, and the Conpanion Disk for that issues (or any
> issue prior to 1997) is not available for download.
>

The second ref was for 1999. Try www.undu.com. The Unofficial Delphi
Newsletter has collected quite a number of useful tips and articles over time,
there may be something for your problem on the site.

C.R.N. de Boer

unread,
May 19, 2000, 3:00:00 AM5/19/00
to
TdxHintWindow = class(THintWindow)
Public
Procedure Paint; override;
{ Maybe also override:
Procedure WMPaint ( var Msg : TWMPaint ); message WM_PAINT;
}
end;

Procedure TdxHintWindow.Paint
begin
{ paint the background etc. }
end;

Neal schreef:
> Peter,


>
> I took a look at the website, and the Conpanion Disk for that issues (or any
> issue prior to 1997) is not available for download.
>

> Dead End.
>
> "Peter Below (TeamB)" <10011...@compuXXserve.com> wrote in message
> news:VA.000050f...@antispam.compuserve.com...
> > In article <3921546a@dnews>, Neal wrote:
> > > I have an application that does not use the Hint property on any of it's
> > > fields. I would like to use the little yellow Hint windows (on each
> field)
> > > to instead display error messages. Here are the things I want to do that
> > > THintWindow does not already do:
> > >
> > > 1. Display Hints on all visible fields, simultaneously and regardless of
> > > where the mouse cursor is.
> > > 2. Display Hints with white text and red backgrounds.
> > >
> > > How can I accomplish #1 and #2?
> >
> > You can create and manage your own instances of THintWindow, or a
> descendent
> > thereof. Brian Long had articles on this subject in The Delphi Magazine,
> > issues 16 (December 1996, "HInts with Attitude") and 43 (March 1999,
> > "Tooltips Under Your Control"). Go to www.itecuk.com/delmag and download
> the
> > companion disks for these issues for the code.
> >

Neal

unread,
May 19, 2000, 3:00:00 AM5/19/00
to
Thanks,

But what about my first question? How do I display Hints on all visible
fields, simultaneously and regardless of where the mouse cursor is?

Neal

"C.R.N. de Boer" <dbcons_s...@xs4all.nl> wrote in message
news:3925145E...@xs4all.nl...

Mike Kolter (Customizable Components)

unread,
May 19, 2000, 3:00:00 AM5/19/00
to
If you want to display them simultaneously then you will need one instance of THintWindow for each
hint you want to show.

Mike Kolter
President, Customizable Components
http://www.cust-comp.com

"Neal" <ne...@msengineering.net> wrote in message news:39256b2a@dnews...

Mike Kolter (Customizable Components)

unread,
May 19, 2000, 3:00:00 AM5/19/00
to
Well I don't know who told you that but they're definately wrong. I've been using a derivative of
THintWindow (seperate instance from Application's hint window) to display custom hints in the SIMPL
component suite since pre v1.0. No problems whatsoever.

On the other hand, you can have only one THintWindow tied to the application which automatically
handles the display of hints (via the standard Hint and HintShow properties in Delphi's components).

In order to do what you want, you'll have to dig into, and become one with the THintWindow class.
You'll have to handle the display and hiding of the hint windows yourself. Not sure how you'd tie
it into various existing components such as TEdit or TListbox though. You'll probably need to
derive your own THintWindow and then implement that at a high level in your application.

Mike Kolter
President, Customizable Components
http://www.cust-comp.com

"Neal" <ne...@msengineering.net> wrote in message news:39258b21@dnews...
> I'm told that only one THintWindow can exist in an Application at a time. If
> that is true then what you're suggesting may not be possible.
>
> Neal


Peter Below (TeamB)

unread,
May 19, 2000, 3:00:00 AM5/19/00
to
In article <39256b2a@dnews>, Neal wrote:
> But what about my first question? How do I display Hints on all visible
> fields, simultaneously and regardless of where the mouse cursor is?
>

Should be obvious: you create one hint window for each visible field.

0 new messages