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. C#
  4. string to richtext format

string to richtext format

Scheduled Pinned Locked Moved C#
question
5 Posts 4 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.
  • A Offline
    A Offline
    Agyeman
    wrote on last edited by
    #1

    how do i convert a string to a rich text format thx Nana

    M 1 Reply Last reply
    0
    • A Agyeman

      how do i convert a string to a rich text format thx Nana

      M Offline
      M Offline
      malharone
      wrote on last edited by
      #2

      Easiest way of achieving this is: Create an object of type RichTextBox Set the Text to your non-RTF text to your RTFtextbox. Get the RTF text by using the RTF property of the textbox. - Malhar

      D 1 Reply Last reply
      0
      • M malharone

        Easiest way of achieving this is: Create an object of type RichTextBox Set the Text to your non-RTF text to your RTFtextbox. Get the RTF text by using the RTF property of the textbox. - Malhar

        D Offline
        D Offline
        Dario Solera
        wrote on last edited by
        #3

        This is a quick-and-dirty solution. You should use some "manual" conversion. ___________________________________ Tozzi is right: Gaia is getting rid of us. My Blog [ITA]

        M L 2 Replies Last reply
        0
        • D Dario Solera

          This is a quick-and-dirty solution. You should use some "manual" conversion. ___________________________________ Tozzi is right: Gaia is getting rid of us. My Blog [ITA]

          M Offline
          M Offline
          malharone
          wrote on last edited by
          #4

          Agree .. but it is guaranteed to work! Fast, simple, safe! Cant ask for anything more :) To avoid performance issues, create and use a static object of type RichTextBox so you are not unncessearily create this object everytime. - Malhar

          1 Reply Last reply
          0
          • D Dario Solera

            This is a quick-and-dirty solution. You should use some "manual" conversion. ___________________________________ Tozzi is right: Gaia is getting rid of us. My Blog [ITA]

            L Offline
            L Offline
            lmoelleb
            wrote on last edited by
            #5

            You should use a manual approach if performance is important and the text is simple (limited formatting). If low maintenance or high reliability is important, use the RichTextBox. There is no point in writing code already provided by Windows - you will simply have more code to introduce bugs into.

            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