How to disable the popup menu of TMemo?

765 Views Asked by At

I'm using Firemonkey TMemo component in my desktop application, I hope that when the user right-clicks or Long-Taps on the Memo , the default menu will not been pop up.

1

There are 1 best solutions below

3
Andreas Rejbrand On BEST ANSWER

This is actually easy.

Just drop a new TPopupMenu on your form and give it a good name (pmRecipe, say). Make sure not to add any menu items to it! Then simply assign it to your memo's PopupMenu property.

However, as a user of your application, I expect a context menu, so I might get annoyed by the lack of such a menu. (I'd also be annoyed by the fact that the app is FMX and not VCL and that the control isn't the native Windows EDIT control, but maybe that's just me.)