Context menu for custom class that draws a canvas


I have written a custom class that has a TCanvas data member, which it draws various things to. Is there a way to create a context menu for my custom class that will appear when I right click anywhere on the TCanvas it draws? Currently the TCanvas object’s context menu appears.


Hi Will,

Take a look at the customContextMenu.C and customTH1Fmenu.C tutorials in $ROOTSYS/tutorials/gui

Cheers, Bertrand.