How to change the background color of a rich text box when it is disabled?

后端 未结 6 832
庸人自扰
庸人自扰 2020-12-10 03:46

Whenever I set the RichTextBox.Enabled property to false, its background color is automatically set to gray as it is set to the color in system color which is s

6条回答
  •  天涯浪人
    2020-12-10 04:04

    Take a look at DrawStringDisabled Method . You will have to override OnPaint method and then use DrawStringDisabled method. But, if I was at your place then I will go with Mikael Svenson's answer.

提交回复
热议问题