Click here to Skip to main content
15,796,456 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:

I'd like to access TextBoxBase.SelectionBrush to change the default blue selection colour in a RichTextBox. How can I access its TextBoxBase?

- Rix

What I have tried:

Updated 14-Jun-17 1:44am

1 solution

If you only want to change the Color-Settings for the selected Text you should use the Properties 'SelectionColor' for the ForeColor of the selcted Text and the 'SelectionBackColor' for the BackColor of the selected Text.
I don't know why these Properties are not directly accessible by the Property-Grid. But if you want to have it you could easily customize the RichtextBox to have this Behaviour.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900