locked
RichTextBox Selection Color RRS feed

  • Question

  • Im using Visual Basic 2008

    In a Richtextbox when you select any text the background color of the selected text changes to blue(or as per the .NET framework / OS)

    For example, when I you'll select this text with mouse, its color will change to blue but in my richtextbox I want some else color(like green).

    Please Help


    Sameer Thigale
    • Moved by Chao Kuo Monday, November 8, 2010 10:01 AM (From:Visual Basic Language)
    • Changed type Sam9584 Saturday, November 20, 2010 10:59 AM
    Monday, November 1, 2010 10:55 AM

Answers

  • 383 Views!

    Can't anyone answer this?


    Sameer Thigale
    • Marked as answer by Sam9584 Sunday, December 5, 2010 10:29 AM
    Saturday, November 20, 2010 10:58 AM

All replies

  • Try setting the SelectionBackColor property of the RichTextBox. E.g.

    myRichTextBox.SelectionBackColor = Color.Green
    

    Monday, November 1, 2010 4:13 PM
  • SelectionBackColor property doesn't work! Its for changing the backcolor and permanently changes the back color event after selection length is zero

    Also the blue color remains as it is :-(

    ***Please Help***

    Note: Such type can be seen in Microsoft Expression Web 3, in console applications, etc


    Sameer Thigale
    Tuesday, November 2, 2010 5:51 AM
  • Hello,

    Please post your question in windows form forum, I think your question is very advanced, some winform experts in winform forum may help you.

    http://social.msdn.microsoft.com/Forums/en/winforms/threads

    Hope this helps.

    Thanks

    Chao


    Please unmark it if it does not help, and mark it if it helps.
    Monday, November 8, 2010 10:00 AM
  • 383 Views!

    Can't anyone answer this?


    Sameer Thigale
    • Marked as answer by Sam9584 Sunday, December 5, 2010 10:29 AM
    Saturday, November 20, 2010 10:58 AM