Hi all,
I have an app that was displaying tooltips in a component in a sidebar. I noticed that it stopped working. I assumed it was a change i had made, but i haven’t been able to fix it so I wonder if something changed in JUCE?
To try and diagnose, I have re-produced the setup in an extremely simple JUCE project (see attached). This project just tries to display a Tooltip in a component displayed below a button, which has a tooltip set on it for when you hover over it.
In short, I have created the TooltipWindow
in a component class:
class TestComponent : public Component
{
// rest of class above here excluded...
private:
TooltipWindow tooltipWindow;
};
and in the constructor have initialised it as follows…
TestComponent::TestComponent()
: tooltipWindow (this, 500)
{
}
I then have a button in MainComponent, which I set a tooltip on…
myButton.setButtonText ("Hover Over Me");
myButton.setTooltip ("Test tooltip text");
The button is displayed just above the TestComponent in MainComponent.
I never see the tooltip. If I change the initialisation of the TooltipWindow to use nullptr
rather than this
for the TestComponent
class then it will display a hovered tooltip. But it won’t display in the component.
Thanks in advance for any help - hopefully it is just something simple I am not doing…
Adam
TooltipTest.zip (18.8 KB)