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. New line in TextBox

New line in TextBox

Scheduled Pinned Locked Moved C#
helpxmlquestion
3 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.
  • V Offline
    V Offline
    ValentinR
    wrote on last edited by
    #1

    hi there i have a problem using a text box i have a text multiline box (accepts return = true) and TextBox1.Text=varText. varText is a text with many lines (in fact is an XML source indented) if i show the text with MessageBox.Show(TextBox1.Text) it looks fine but in the edit box instead of 'new line' i have '|' what can i do? any idea? thanks in advance for your help

    T 1 Reply Last reply
    0
    • V ValentinR

      hi there i have a problem using a text box i have a text multiline box (accepts return = true) and TextBox1.Text=varText. varText is a text with many lines (in fact is an XML source indented) if i show the text with MessageBox.Show(TextBox1.Text) it looks fine but in the edit box instead of 'new line' i have '|' what can i do? any idea? thanks in advance for your help

      T Offline
      T Offline
      trones
      wrote on last edited by
      #2

      i had the same problem but i solved it like this: msgbox.text = "texttext\r\n"; and it worked for mem so i suggest u should try that! // trones

      V 1 Reply Last reply
      0
      • T trones

        i had the same problem but i solved it like this: msgbox.text = "texttext\r\n"; and it worked for mem so i suggest u should try that! // trones

        V Offline
        V Offline
        ValentinR
        wrote on last edited by
        #3

        thank you for your answer, trones i solve the problem this way: char cr=(char)13; char lf=(char)10; string strCR,strLF,strCRLF; strCR=cr.ToString(); strLF=lf.ToString(); strCRLF=strCR+strLF; art=art.Replace(strLF,strCRLF); textBox1.Text=art;

        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