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
565
prevent paste operation in EditorWithText
posted

hi

In WinTree (WinForms 2008 Vol 1 CLR 2.0) how can I prevent paste values to EditorWithText?

TIA,

Sheeba

  • 69832
    Suggested Answer
    Offline posted

    You cannot prevent pasting text in without also disabling typing characters. The reason for this is that most users expect to be able to have access to clipboard functionality if the control supports editing. You can prevent changing the value, including via a paste operation, by setting the ReadOnly property to true.