View Issue Details

IDProjectCategoryView StatusLast Update
0021386LazarusIDEpublic2012-03-01 00:14
ReporterAlien Assigned ToPaul Ishenin  
Status resolvedResolutionfixed 
Platformx86-64OSWindows XP 64 bit 
Product Version0.9.31 (SVN) 
Fixed in Version0.9.31 (SVN) 
Summary0021386: Tooltip colours not matching Windows settings
DescriptionIt appears that whilst colour settings are detected correctly, as seen by the fact that various colour lists/menus show the correct colour for when it comes to showing tooltips

When displaying tooltips [i.e. when the mouse cursor is over a button], Lazarus apparently ignores the colour setting infotext, but still applies the background colour [infobk]. With the default Windows colours [black text on white (or pale yellow?) background] it's not a problem, but if you have your Windows colours set so that tooltips are white text on a black background, Lazarus' tooltips become unreadable, as shown in the attached image.

I should mention that the various colour lists/menus for colour-related settings show the correct colour assigned to infotext, it's just the tooltips that aren't being coloured correctly.

Also, I gave CodeTyphon a go, just on case they'd fixed the prob [they haven't], & noticed that the same prob happens with the CT app [incorrectly coloured tooltips].
Steps To Reproduce1. Set Windows' tooltip colours to white foreground, black background
2. Try viewing tooltips in Lazarus
Additional InformationI marked it as major, as without tooltips, Lazarus is pretty-much useless, at least to someone who doesn't know its GUI off-by-heart.
TagsNo tags attached.
Fixed in Revision35621
Attached Files


2012-02-27 19:55


laz-tooltip-001.png (8,064 bytes)   
laz-tooltip-001.png (8,064 bytes)   


2012-02-29 00:27

reporter   ~0057155

I don't know if this makes any difference, but I tried putting a button on a form & added some hint text, then built it, & when I ran it the problem was in that prog too.

In light of this, perhaps it's not a fault with the IDE as such, but something on which the IDE depends?

Paul Ishenin

2012-02-29 08:30

manager   ~0057157

Please test and close if ok.


2012-02-29 14:28

reporter   ~0057165

It took me a while to figure out how to get the file & what to do with it, but I think I've got it sorted in the end.

The problem does appear to have gone away now, but before I close this issue I wanted to share a thought that occurred to me, & see what you think.

You said: "win32: don't try to draw tooltip text in windows XP using themes - XP themes does not know how to draw it (bug 0021386)". Whilst I was waiting for a response to my bug report, I had a bit of a wander through some of the source files. Admittedly most of it went over my head, as I'm still very much the FPC/Lazarus newbie, but I did notice something that seems kinda odd.

In forms.pp I saw that it sets the background colour for tooltips to clInfoBk, but didn't manage to find anything that looked like the tooltip text colour being set to clInfoText. In fact, clInfoText doesn't get a mention in forms.pp at all.

As I said, I'm still very much an FPC/Lazarus newbie, so there may well be some reason for the apparent omission that is obvious to everybody else, but I just thought I'd mention it.

Paul Ishenin

2012-03-01 00:14

manager   ~0057175

Look at THintWindow.Create()

Canvas.Font := Screen.HintFont;

Then look at TScreen.GetHintFont()

FHintFont.Color := clInfoText

The problem with themed application was that DrawThemeBackground() and DrawThemeText() on windows XP are not implemented for ToolTip part drawing while they perfectly work since windows vista. As result neither the hint background is drawn correctly by XP theme manager (and LCL replaces the background drawing by own means) not the hint text.

Issue History

Date Modified Username Field Change
2012-02-27 19:55 Alien New Issue
2012-02-27 19:55 Alien File Added: laz-tooltip-001.png
2012-02-27 19:55 Alien Widgetset => Win32/Win64
2012-02-29 00:27 Alien Note Added: 0057155
2012-02-29 07:56 Paul Ishenin Status new => assigned
2012-02-29 07:56 Paul Ishenin Assigned To => Paul Ishenin
2012-02-29 08:30 Paul Ishenin Fixed in Revision => 35621
2012-02-29 08:30 Paul Ishenin LazTarget => -
2012-02-29 08:30 Paul Ishenin Status assigned => resolved
2012-02-29 08:30 Paul Ishenin Fixed in Version => 0.9.31 (SVN)
2012-02-29 08:30 Paul Ishenin Resolution open => fixed
2012-02-29 08:30 Paul Ishenin Note Added: 0057157
2012-02-29 14:28 Alien Note Added: 0057165
2012-03-01 00:14 Paul Ishenin Note Added: 0057175