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,343
  • 5
  • 31
  • 45
sd_dracula
  • 3,796
  • 28
  • 87
  • 158

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
  • 398
  • 1
  • 2
  • 10
  • 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