How to remove the default context menu of a TextBox
Control?
Is there a property to disable it?
Thanks :)
C# context menus are the menus that pop up when the user clicks with the right hand mouse button over a control or area in a Windows based form. They are called context menus because the menu is usually specific to the object over which the mouse was clicked.
You can also set the ShortcutsEnabled
property to false
. This removes the default context menu and all clipboard functionality. I presume that's why you're trying to suppress the menu? I can't think of any good reason other than purposefully preventing your users from using copy/paste.
Try setting the ContextMenu property of the TextBox to a dummy, empty ContextMenu instance.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With