interceptMouseClicks blocks tooltip

Hi,

I have a label init like this:

        trackName.reset( new Label { "trackName", "track" } );
        trackName->setJustificationType(Justification::centredLeft);
        trackName->setEditable(false);
        trackName->setInterceptsMouseClicks(false, false);
        trackName->setTooltip(trackName->getText());
        addAndMakeVisible(trackName.get());

If I comment setInterceptsMouseClicks tooltip works, viceversa not. I need to set interceptMouseClicks on off because on parentComponent I need to get the click and the drag of the mouse. Any ideas to fix this without override Label class? :blush:

I’d consider not using setInterceptsMouseClicks and instead use the mouse methods (mouseDown, mouseDrag, mouseUp, mouseWheelMove, mouseDoubleclick) to manually call these methods on the components that lie below the (supposedly transparent looking) label

1 Like

yes, it’s what I think, only was curious to know if there was some other trick :pray: