0

I want to get the same functionality as Textbox.Enabled = false; so that the text in a textbox is not selectable at all but without the text changing to light gray. It should stay the same.

Textbox.ReadOnly = true; still lets you select it so that's not good.

And no it has to be a textbox not a label unfortunately.

Abdusalam Ben Haj
  • 5,283
  • 5
  • 29
  • 44
sd_dracula
  • 3,672
  • 25
  • 85
  • 151

1 Answers1

1

Is this in WPF? If so you should use Textbox.Enabled = false; and change the styling so that this disabled textbox looks the way you want it to look.

jeconner
  • 388
  • 1
  • 2
  • 8
  • yes it's weird though as if I set `textBox1.BackColor = Color.Red;` works just fine but `textBox1.ForeColor = Color.Black;` does not. Not sure why – sd_dracula Feb 15 '13 at 16:47