innovator2
asked on
How to prevent selection of text in a text control (e.g. textbox or richtextbox
Hi all!
I have a richtextbox control which I want to make available to users.
They can read its contents but I don't want them to be able to select any text or copy them
What I have done
1. I set the property of the control to read only
2. I wrote this
if(rtfCase.SelectedText.Le ngth > 0)rtfCase.SelectedText = "";
in the MouseUp, KeyUp and SelectionChanged events of the RTF control, but no luck.
Can someone please help me out.
Thank you
I have a richtextbox control which I want to make available to users.
They can read its contents but I don't want them to be able to select any text or copy them
What I have done
1. I set the property of the control to read only
2. I wrote this
if(rtfCase.SelectedText.Le
in the MouseUp, KeyUp and SelectionChanged events of the RTF control, but no luck.
Can someone please help me out.
Thank you
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER