Results 1 to 11 of 11

Thread: Adding Colored Text To RichTextBox

Threaded View

  1. #1

    Thread Starter
    Member
    Join Date
    Jan 2010
    Posts
    55

    Adding Colored Text To RichTextBox

    Hi guys,

    please help me with the thing I'm stuck.
    I'm stuck because I don't know how to add colored text to a richtextbox.

    To make already existing text colored, I have tried things like:

    Code:
    RichTextBox1.SelectionStart = RichTextBox1.Find("colored word")
    RichTextBox1.SelectionColor = Color.Blue
    RichTextBox1.SelectionLength = 0
    ..so it will change the color of the found word.

    The problem is, when the "colored word" exists multiple times in the textbox, it will never change theirs color. It only searches for the first "colored word" and it wont affect the others.

    It would be even better when someone knows how to directly add colored text instead of changing it when it's added.

    Any help available?
    Last edited by Cooi; Jan 25th, 2010 at 12:51 PM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width