Tooltips garbled when moving fast

Hi all,

Latest tip from today…

When I go over components with tooltips and I move “slow enough” from one component to the next all is fine.
However, when I move quickly, the tooltip-text from one component is overlaid on the tooltip-text of the next component.
I can reproduce this faithfully.


  • Bram

Bizarre… I can’t any way it could possibly be drawn like that! I also can’t think why the speed would make any difference…

Ah, found it: aparently tooltips should not have a (slightly) transparent background colour…
That’s a pitty…

Here is some code if you want to reproduce, just move from red to green a few times:

class MainContentComponent   : public Component

        addAndMakeVisible(m_Label1 = new Label());
        m_Label1->setTooltip("THIS IS A TOOLTIP");

        addAndMakeVisible(m_Label2 = new Label());
        m_Label2->setTooltip("ALSO! THIS IS A TOOLTIP TOO!");

        setSize (500, 400);


    ~MainContentComponent() {};

    void paint (Graphics&) {};

    void resized()
        m_Label1->setBounds(0, 0, 100, 100);
        m_Label2->setBounds(0, 100, 100, 100);

    class DefaultLookAndFeel : public LookAndFeel
            setColour(TooltipWindow::backgroundColourId, Colours::black.withAlpha(0.1f));
            setColour(TooltipWindow::textColourId, Colours::white);

    ScopedPointer<Label> m_Label1;
    ScopedPointer<Label> m_Label2;
    TooltipWindow m_TooltipWindow;
    DefaultLookAndFeel m_DefaultLookAndFeel;


I guess something should be written somewhere about not using a transparent color as background, or it should be fixed in another way, I suppose.
It would be nice to be able to have half-transparent tooltip windows - but not very important I suppose.

  • bram

In that case I’d have thought that if you call setOpaque (false) on your tip window, that’d work ok?

hah! of course that works.
thx! :slight_smile:

  • bram