I am showing some text on RichTextBox in a winform. But I dont want the user to interact with it. Even after setting it Read Only, I can still see the cursor blinking inside it. If I disable it, the text gets faded which I dont want. Any idea how can I make it work or any work around. I am using RichTextbox because I need multilines and I need to show the borders around it. And its size is fixed.
+2
A:
Set the following properties on your RichTextBox
Enabled = false
ReadOnly = true
ForeColor = #000001 // From code, say = Color.FromArgb(0, 0, 1)
The "trick" is setting the ForeColor
to something that isn't quite black (#000000
); if you do that then the text won't come out as gray when the RichTextBox
is disabled.
Daniel LeCheminant
2009-06-30 19:50:02