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
630
How to Override Copy, Cut & Paste on UltraTextEditor?
posted

When using a Windows TextBox it is fairly simple to override the Copy, Cut and Paste methods by overriding the WndProc method.

However, when overriding this method for an UltraTextEditor, the messages are not coming through (probably because the messages are being sent to the EmbeddableTextBoxWithUIPermissions?). I am basically inheriting the UltraTextEditor and creating a control that will accept certain types of characters based on a regular expression and I want to interrupt the Paste operation, in particular, so that any Text being pasted is validated beforehand.

Any ideas how I can override the Copy, Cut and Paste operations?

Parents
No Data
Reply
  • 469350
    Verified Answer
    Offline posted

    Hi,

    The only thing I can think of would be to handle the key events and watch for Ctrl+V or Shift+Ins. You would also have to create your own context menu to replace the built-in one provided by Windows so you could handle Paste - and this means you would have to handle all of the other shortcuts like cut and copy, as well.

Children