Appearance of RichTextBox

I am showing some text on a RichTextBox in winform. But I do not want the user to interact with him. Even after the read-only setting, I still see the cursor blinking inside it. If I turn it off, the text will disappear, which I do not want. Any idea how I can make it work or work. I use RichTextbox because I need multilines and I need to show the borders around it. And its size is fixed.

+3
source share
2 answers

Set the following properties in RichTextBox

Enabled  = false
ReadOnly = true
ForeColor = #000001 // From code, say = Color.FromArgb(0, 0, 1)

A "trick" sets ForeColorinto something not quite black ( #000000); if you do this, the text will not be grayed out if RichTextBoxdisabled.

+6

"Enter" .

-1

Source: https://habr.com/ru/post/1711607/


All Articles