groupComponents dont trigger mouseEnter


mouseEnter on my main UI component triggers for all components except groupComponents.
Anyone else encountered this?

For my UI’s I have a heriarchy like:
PluginEditor > MainUI > sliders & components

in the contstructor for MainUI I include::
addMouseListener(this, true);

Finally I’ve overridden void mouseEnter(const MouseEvent& event) override;

With a big long bunch of ifs containing if (event.eventComponent == <component ptr>) ...e.g.update the help text

for those lines where the component ptr is a groupComponent, the if doesn’t trigger.

Cheers for any pointers,


IIRC group components don’t intercept the mouse, so won’t respond to any mouse events. See Component::getInterceptsMouseClicks


Much appreciated Julian.

I’ve added a <groupComponent>->setInterceptsMouseClicks(true, true); and it works.

I’ve also found that using:
is more efficient than
(event.eventComponent == <groupComponent ptr>)