Sub Tooltip Issues

Roger Garstang

Well-Known Member
Licensed User
Longtime User
I've been having some odd tooltip issues lately. The faded tooltip always has been sort of useless because it fades too far, so I just consider it off and on. The last 1-2 weeks though when I toggle it sometimes just turns black (Solid Black square). Sometimes I can make it go away, but other times it stays. Either way usually requires restarting B4A to fix it.

I also keep losing my extra comments I have in my class and it will just show the sub specs. If I reopen the project they will appear again then a couple lines down I'll type the same class/sub without changing anything and they are gone again. I know sometimes they get out of sync if I change a comment or add/remove a sub parameter, but usually saving will get them back in sync. This is just them being gone completely from the tooltip.
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
About the black tooltip, I didn't encounter such an issue. I guess that it is not consistent. It sounds like a bug in the underlying UI library. If you are able to reproduce it then please post the steps required.

Changes done to comments can take a few seconds till they are recognized. In some cases errors like broken subs or duplicate subs can break the background parser. You can try to compile your program in this case and see if there are any errors.
 

Roger Garstang

Well-Known Member
Licensed User
Longtime User
Just opened my project and clicked the nearest piece of code calling a sub. Deleted the opening ( to get the tooltip which came up fine. Hit ctrl for the faded to the point of not able to read tooltip and it faded fine. Hit again to return to normal and solid black box. Hit again to fade and it faded. Hit again to bring back and black box. Did the same thing with 3 other pieces of code showing the tip correctly then getting a black box when bringing back.

On the 3rd one I decided to see what happens when I click the tooltip. It stayed black, but when I opened a tooltip on another piece of code it now displayed/faded/returned properly like that reset something.

One other interesting thing to note is that when a tooltip is clicked the Titlebar and Menu at the top flicker like they are being repainted. Tooltips are really just a yellow window/label and usually will either close on click, stay on click, or pass the click on to the window underneath. Usually a timer times out the tooltip too, so either it has to be overrode, the tooltip is subclassed, or it is a custom control. There shouldn't be anything repainting unless the click gets passed to the window/IDE below and it goes nuts and does something.
 
Last edited:

Roger Garstang

Well-Known Member
Licensed User
Longtime User
There is an issue with repaint to do with themed buttons that causes them to flicker if the TTF_TRANSPARENT style isn't included. This is because the tip pops up over the button and it thinks the mouse is no longer hovering, so it redraws the theme which draws on top of the tooltip and then it sees the mouse again and thinks it is hovering so redraws again at which point the tooltip puts itself back on top and the cycle repeats.

I can't seem to link it to whether the mouse is over it or not, but something else could be having the same effect, so might want to make sure TTF_TRANSPARENT is there. Windows itself has a lot of issues with its own tooltips losing the Topmost style too...especially in the Taskbar, so you need to always make sure that is set.
 
Top