Hopefully a simple question reqarding popup menus


in my app i want to have two different popup menus, one assigned to middle click and the other assigned to right click.

im not exactly sure how to go about this, any pointers ?


Since all JUCE components inherit MouseListener, you just add to your derived class a “void mouseDown (const MouseEvent &e)” member, then check for a right or middle mouse button down in the ModifierKeys, i.e:

class MyComponent : public Component { void mouseDown (const MouseEvent& e) { if(e.mods.isRightButtonDown()) { // Do something here } } };- kbj


ahh sweet thanks very much!