Detecting right click in ListBox::backgroundClicked()


The function does not have a MouseEvent parameter so I tried:




All to no avail, how do I find whether it was a right click of now?

That’s probably because the event is triggered when the mouse-up happens, so the right button is no longer down.

I don’t really want to get into a feature-creep situation where I add more and more callbacks: if I add a rightButtonClicked method someone will then ask for a mouseMoved, mouseDragged, etc etc. Maybe just add your own mouselistener to the component and intercept the events?

ok, thanks.