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
50
Possible bug with UltraTextEditor Context Menu
posted

Hello, lately I have been working on trying to add a custom context menu to the UltraTextEditor. I would like it to show a list of possible spelling error suggestions kind of similar to the MS word spell checker. To do this, I followed the sample from the documentation fairly closely, with the only major difference being that I used an UltraTextEditor instead of a RichTextBox. Here is a link to the sample I followed: Creating a Shortcut Menu to Resolve Spelling Errors - Infragistics Windows Forms Help. The problem I am having is this: If a user presses down the right click button while the mouse is in the UltraTextEditor, but then releases it while the mouse is outside the UltraTextEditor, it shows the default context menu. Any help with this issue would be greatly appreciated. Thanks.

Parents Reply
  • 29105
    Verified Answer
    Offline posted in reply to Riley Coulter

    Please use our UltraFormattedTextEditor. The Microsoft textbox, which our UltraTextEditor is using, display the built-in context menu when mouse is moved away from the control even when a context menu strip is applied. Which I agree is odd and I couldn't find any feasible solution to turn off without impacting the custom context menu. 

    We can reproduce this behavior with the sample above, but it appears to be expected. The built-in textbox has a ShortcutsEnabled when set to false will disable all shortcuts including the built-in context menu and will continue to show the custom ContextMenuStrip on focus only (not away). The UltraTextEditor doesn't have the ability to turn off the built-in context menu unless you set the ContextMenu property to a new ContextMenu() without any items but this will prevent your custom context menu from appearing. 

    The answer to your question is to use our UltraFormattedTextEditor as it doesn't show a default context menu on mouse away. It's possible we circumvented this issue when this particular control was created. So this appears to be the answer you are looking for.

    Let me know if you have any questions.

Children
No Data