How to disable the context menu of TCanvas?

Hello,

Simple question: How do I disable the context menu of a canvas?

Thanks,
Andreas

Hi Andreas,

Simple answer: You can’t (AFAIK)…

Cheers, Bertrand.

Hi Betrand,

If I derive my own class from TCanvas, is there any way to block the mouse click event?

Thanks,
Andreas

Hi Andreas,

Sorry, I was too fast :blush: , here is the way to disable the context menu:

Cheers, Bertrand.