B4J Question Label TooltipText shows up even if set to an empty string [solved]


Active Member
Licensed User
This is strange. If I create a label and never define a TooltipText, the tooltip does not show up at all. If I define the TooltipText as an empty string "", it shows up as a small empty tooltip.

In my project, I change the value of the tooltiptext depending on what the program is doing so sometimes I redefine a tooltiptext to an empty string but then it shows the small empty box. If I define it as the B4J Null (no quotes), then it shows up as "Null" :)

I must be missing something.


Well-Known Member
Licensed User
If you want to remove the tooltip this code will do it
 Dim RemoveToolTip As JavaObject
 Dim theNode As JavaObject = lab ' the node with the tooltip
If later you want to add one back, just use the tooltiptext method as normal


Active Member
Licensed User
Great, thank you very much!
I definitely would not have found that one by myself...
But at least I understand what it does, it replaces the label with a new one.
I tried it on a button and it works too.