Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
460
How can I Disable Right Click and shortcut keys in UltraTextBox
posted

How can I Disable Right Click and shortcut keys in UltraTextBox

Im creating a gradebook program.

Some textbox should not accept numbers

what I did here is I've created a keypress event and handles the event if the user input other of type integer/number.

But then What if the user use the right click and paste characters that is not qualified to be a number?

So then I thought I should Disable the right click functionality of the textbox,

I thought disabling the right click for ultratextbox is the same for UltraExplorerBar(list view)

but I cant find the "showDefaultContextMenu" property in the UltraTextbox.

So how do can I do this?

any Help is greatly appreciated

  • 469350
    Suggested Answer
    Offline posted

    The default context menu you see when you right-click on UltraTextEditor actually comes from the inbox TextBox control which is overlaying the control.

    The only way to remove this is to create a context menu with no items on it and assign it to the UltraTextEditor.

    Note that this will not disable the keyboard shortcuts for cut, copy, and paste. You will still need to use the Key events for that.