Search code examples
delphidelphi-xe

Change font for Tballoonhint (Delphi)


When I use the TBalloonhint (delphi) component I can not find how to change the default font. Is there any way?


Solution

  • You have two choices:

    1. Simple but not recommended: you may adjust the font by using Screen.HintFont property. I would not recommend this method as you need to disable Theme support in your application (Project Options\Application\Runtime Themes = None)
    2. You may implement your own TBalloonHint component. I assume it should be very easy. As you could find in Delphi sources TBalloonHint has two methods only (PaintHint and SetHintSize). You may take VCL implementation and remove theme support from it (assume IsThemed = false).