i would like to know if it is possible to disable the edition of a textbox without losing the scrolling capability. If the Enabled property is set to false then the scroll bars are also disabled
the easiest way would be to use "readonly" instead. another way would be to use a fixed-height div will overflow:scroll that looks like a textarea but isn't.
Right-click the control for which you want to set a text-scrolling option, and then click Control Properties on the shortcut menu. Click the Display tab. In the Scrolling list, click the text-scrolling option that you want.
Try:
textBox1.ReadOnly = true;
Disable text selection:
ContextMenu blankContextMenu = new ContextMenu();
textBox1.ContextMenu = blankContextMenu;
For disabling Ctrl+C and Ctrl+V, capture them on KeyDown event
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