How is someone supposed to learn about TooltipWindow?

After trying to figure out why my tooltips weren’t showing, I ended up discovering that I just needed to have a TooltipWindow object.
But this isn’t something I saw anywhere in the docs of setTooltip etc.
How is one supposed to know they need to do it?
Hopefully this thread will help folks find this answer when they face the same issue.
Cheers, Yair

4 Likes

I had this same issue when first wanting to implement tooltips, seemed completely opaque. I can’t even remember how I figured it out.

The only way I can see how one might discover this from the docs is noticing that “getTooltip implements TooltipClient”, looking at that says:

A TooltipWindow will wait for the mouse to hover over a component that implements the TooltipClient interface, and when it finds one, it will display the tooltip returned by its getTooltip() method.

and then finally looking at TooltipWindow docs that explain how to implement tooltips in practice. (you might also arrive there by checking TooltipClient & TooltipWindow from the “See also” in SettableTooltipClient)

It certainly wouldn’t harm for the documentation of SettableTooltipClient to explicitly say something like, “See the TooltipWindow docs for details on how to implement tooltips correctly.”.

1 Like

Same here. The way I figured it out, if I recall, is finding that some of the DemoRunner demos had working tooltips.

2 Likes

Yeah the demos are invaluable to see how to do things with JUCE, but I tried that too and ended up missing that part in the demos code…