Delphi Application.HintColor

In Delphi 2010 (I don’t know about other versions) Application.HintColor does not seem to work when running on Windows 7. In XP, it gives the desired color. Any workarounds for this?

+3
source share
4 answers

HintColorsimilar to some of the other * color properties in VCL, because when you run a theme application in a theme OS, they can be ignored when drawing a control. The tips are a bit different, because for them it is Vista or higher, not XP or higher. You can see this if you look THintWindow.Paintin Controls.pas- it specifically draws a Vista gradient background if it is on and if themes are on.

, , .

, :

  • THintWindow
  • ,
  • , .

, THintWindow - ( , .) , TApplication.OnShowHint ( TApplicationEvents ) HintInfo HintWindowClass .

Paint NCPaint. NCPaint , (, DrawEdge.) Paint, , DrawText . VCL, , , , , , , VCL.

, . , , , , , , .

: ? - ? , , - , , , . . , , , , OS/look, .

+4

, . , . (IOW, "" ). (, ).

"". , TjvBallonHint / TjvDesktopAlert (, TjvDesktopAlertStack) JEDI JVCL, . ( ) . , , .

+2

" " .

0

In Delphi 2010, you have the TCustomHint class. You can extract a new class from it that displays a new type of tooltip.

You can assign your new class to the CustomHint property of your forms or any other controls, and Delphi will use your custom tooltip class to display tooltips for that control.

You can check the source code for the TBalloonHint class, which is a TCustomHint descendant in Controls.pas

0
source

Source: https://habr.com/ru/post/1733354/


All Articles