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. about richtextbox

about richtextbox

Scheduled Pinned Locked Moved C#
questionhelptutorial
5 Posts 2 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.
  • C Offline
    C Offline
    cauvang
    wrote on last edited by
    #1

    I have a problem when using richtextbox. I use richtextbox to display the content of a file. In the richtetxtbox, it automatically inserts a space in the first word. For example, in my file " Doctor John is very kind". And in my richtextbox "D octor John is very kind". Why do I meet this problem and how can I overcome this problem? Thanks a lot.

    J 1 Reply Last reply
    0
    • C cauvang

      I have a problem when using richtextbox. I use richtextbox to display the content of a file. In the richtetxtbox, it automatically inserts a space in the first word. For example, in my file " Doctor John is very kind". And in my richtextbox "D octor John is very kind". Why do I meet this problem and how can I overcome this problem? Thanks a lot.

      J Offline
      J Offline
      James Gupta
      wrote on last edited by
      #2

      What type of file are you trying to load, and which richTextBoxStreamType are you using?

      C 1 Reply Last reply
      0
      • J James Gupta

        What type of file are you trying to load, and which richTextBoxStreamType are you using?

        C Offline
        C Offline
        cauvang
        wrote on last edited by
        #3

        here is my function to load the file void OpenFile() { openFileDlg.DefaultExt = "*.txt"; openFileDlg.Filter = "Text Files|*.txt"; if(openFileDlg.ShowDialog() == System.Windows.Forms.DialogResult.OK && openFileDlg.FileName.Length > 0) { rtxt.LoadFile(openFileDlg.FileName, RichTextBoxStreamType.UnicodePlainText); } }

        J 1 Reply Last reply
        0
        • C cauvang

          here is my function to load the file void OpenFile() { openFileDlg.DefaultExt = "*.txt"; openFileDlg.Filter = "Text Files|*.txt"; if(openFileDlg.ShowDialog() == System.Windows.Forms.DialogResult.OK && openFileDlg.FileName.Length > 0) { rtxt.LoadFile(openFileDlg.FileName, RichTextBoxStreamType.UnicodePlainText); } }

          J Offline
          J Offline
          James Gupta
          wrote on last edited by
          #4

          Load it as PlainText instead of UnicodePlainText This should solve your problem James

          C 1 Reply Last reply
          0
          • J James Gupta

            Load it as PlainText instead of UnicodePlainText This should solve your problem James

            C Offline
            C Offline
            cauvang
            wrote on last edited by
            #5

            I know that if I used PlainText, this problem wouldn't happen. But I have to use UnicodePlainText because my file is Vietnamese, it needs font Unicode.

            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