How to show popup with full text which is too long to fit it in Label bounds?

Hello,
it seems to be quite standard behaviour when user hover mouse over text which is too long to fit it in defined bounds to show full text in some popup.

I wonder if is there such solution in Juce code or do I need to override Label::mouseEnter() to provide such solution?

I’ve tried to find something like that in juce::Label documentation, but I can’t see anything in reference to that.

For any help great thanks in advance.

Best Regards.

1 Like

call setTooltip on the object.

1 Like

Hmm… great thanks I will check it.

Here is how I am trying to make it work …without success:

 class ToolTipTest: public juce::Component,  public juce::SettableTooltipClient { 
... 
ToolTipTest(){
...
  setTooltip("tooltip");
...
}

Any hints?

You need a TooltipWindow instance: JUCE: TooltipWindow Class Reference

My only experience is with audio plugins, I just add a

juce::SharedResourcePointer<juce::TooltipWindow> tooltipWindow;

to my Editor class and it "just works"™️.

1 Like

It works actually… .Thanks.