As part of an application I feed text into a richtextbox in readonly mode.
If I feed in an empty string the application beeps e.g.:
String blah = "";
richTextBox1.SelectedText = blah;
result:
<beep>
Why is this?
Chris
Chris,
Because the Richtextbox is in ReadOnly mode. Set ReadOnly to False and you
don't get the beep. Essentially, the beep tells you that you have tried to
access something that you can't, or enter data where you can't.
Thanks,
- Mike
Chris - 16 Jan 2006 23:03 GMT
> Chris,
> Because the Richtextbox is in ReadOnly mode. Set ReadOnly to False and you
> don't get the beep. Essentially, the beep tells you that you have tried to
> access something that you can't, or enter data where you can't.
> Thanks,
> - Mike
Hi Mike,
I should of been more clear. If I enter anything else into the textbox
there is no beep:
String blah = "test";
richTextBox1.SelectedText = blah;
causes no bleep. Even entering only escape characters causes no bleep.
It only ever occurs if string == "";
Chris.