Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. display rtf text in diff colors

display rtf text in diff colors

Scheduled Pinned Locked Moved Visual Basic
helpquestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    R Thomas 0
    wrote on last edited by
    #1

    hi...i need to display the test in different colors in a RTF.. can u pls help??? lets say i have this text "Beautifull World" now i want to display this text in such a way so that "Beau" is in red color "tifu" is in green "l World" is in blu color.. onto a rich edit text box... can someone plese help me??? tks a lot... Have a Super Blessed Day! ------------------------- For God has not given us a spirit of fear, but of power and of love and of a sound mind. 2 Timothy 1:7 "For God so loved the world that He gave His only begotten Son, that whoever believes in Him should not perish but have everlasting life." John 3:16 "Therefore you also be ready, for the Son of Man is coming at an hour you do not expet." Luke 12:40

    C T 2 Replies Last reply
    0
    • R R Thomas 0

      hi...i need to display the test in different colors in a RTF.. can u pls help??? lets say i have this text "Beautifull World" now i want to display this text in such a way so that "Beau" is in red color "tifu" is in green "l World" is in blu color.. onto a rich edit text box... can someone plese help me??? tks a lot... Have a Super Blessed Day! ------------------------- For God has not given us a spirit of fear, but of power and of love and of a sound mind. 2 Timothy 1:7 "For God so loved the world that He gave His only begotten Son, that whoever believes in Him should not perish but have everlasting life." John 3:16 "Therefore you also be ready, for the Son of Man is coming at an hour you do not expet." Luke 12:40

      C Offline
      C Offline
      Csharp
      wrote on last edited by
      #2

      With RichTextBox1 .SelectionStart = .TextLength .SelectionColor = Color.Red .SelectedText = "Beau" .SelectionColor = Color.Green .SelectedText = "tifu" .SelectionColor = Color.Blue .SelectedText = "l world" End With

      Csharp™  the coder formally known as dynamic


      Dim TwinsHaveArrived As String = "twins arrived safely , 17/08/2003 (18:05 & 18:07)"


      1 Reply Last reply
      0
      • R R Thomas 0

        hi...i need to display the test in different colors in a RTF.. can u pls help??? lets say i have this text "Beautifull World" now i want to display this text in such a way so that "Beau" is in red color "tifu" is in green "l World" is in blu color.. onto a rich edit text box... can someone plese help me??? tks a lot... Have a Super Blessed Day! ------------------------- For God has not given us a spirit of fear, but of power and of love and of a sound mind. 2 Timothy 1:7 "For God so loved the world that He gave His only begotten Son, that whoever believes in Him should not perish but have everlasting life." John 3:16 "Therefore you also be ready, for the Son of Man is coming at an hour you do not expet." Luke 12:40

        T Offline
        T Offline
        the_warlord
        wrote on last edited by
        #3

        You need to encode your string manually with rtf codes as far that I know The warlord

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups