When using TballoonHint
, I need it more personalized in colors, shape, transparency and animated appearance, how can I do that?
I want a more personalized BalloonHint (Background color/Rounded Corner/transparency)
2.4k views Asked by ghaek741977 At
1
Create your own descendant of
TBalloonHint
orTHintWindow
. Override theNCPaint
method to draw the outer edges (non-client area) andCalcHintRect
(if needed), and provide your ownPaint
method to draw the interior as you'd like it to appear.Then assign it to
Application.HintWindowClass
in your .dpr file just before the call toApplication.Run
.Here's a (very minimal) example that does nothing but paint the standard hint window with a green background.
Save this as MyHintWindow.pas:
A sample project to use it:
Form1.ShowHint
property toTrue
in the Object Inspector.TEdit
, for instance) on the form, and put some text in it'sHint
property.Add the indicated lines to the project source:
Sample output (ugly, but it works):