Hopefully a simple question reqarding popup menus


#1

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 ?


#2

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


#3

ahh sweet thanks very much!


#4