mouseUp is not triggered for parent component if mouseDown was inside a child component


#1

How do I deal with this? Do I need, in every child component’s mouseUp a function that triggers a function for the Parent or is there a JUCE-built-in way for the parent to receive all mouse events of children?


Very confused, why is there no "isPointInsideRect" function?
#2

That’s as intended. Mouse-drags and mouse-ups always go to the same place that the original mouse down was sent.

You should probably spend some time browsing the Component methods - there’s stuff in there to let you attach mouse listeners to watch other components (optionally receiving copies of all events in all subcomponents). Also ways to make subcomponents ignore the mouse, which may make more sense if you want your parent to be the thing handling these events.


#3

got it. (I need both parent and children handling mouse events). Edit: Already solved it with Component::addMouseListener. Easy when I know what to look for!