1

I have a richTextBox1 on Form1 in the designer set to ReadOnly true. But when i run the program the focus is on the richTextBox the input is in the richTextBox like the user can type something inside. He cant but it looks like.

Is there any way to avoid it or to set that when im running the program or if the user will click on the richTextBox it will never enter it like he can write inside ?

user1741587
  • 769
  • 2
  • 6
  • 27

2 Answers2

1

If you really don't want the user to access it, you should probably just set it Enabled = false.

Yan Brunet
  • 4,727
  • 2
  • 25
  • 35
  • Lostdreamer you right just found it now. The problem with that is that its changing also the richTextBox background color to gray and even if you change in the constructor the background color to white it dosent change. Thats why i hate the Enabled property. – user1741587 Oct 18 '12 at 03:38
  • If this is the problem, have a look a this answer : http://stackoverflow.com/questions/1946139/how-to-change-the-background-color-of-a-rich-text-box-when-it-is-disabled – Yan Brunet Oct 18 '12 at 03:43
0

May be you can set focus on the next control in the form.

Vijaychandar
  • 716
  • 5
  • 21