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. Newline in Textbox

Newline in Textbox

Scheduled Pinned Locked Moved C#
question
4 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.
  • M Offline
    M Offline
    matthias s 0
    wrote on last edited by
    #1

    Hi folks, can somebody tell me why TextBoxes do not render the text (assigned through the Text property) properly when using new line escape sequence like in string s = "firstline\nsecondline";. How can I solve this? Thanks a lot in advance! Matthias

    If eell I ,nust draw to your atenttion to het fakt that I can splel perfrectly well - i;ts my typeying that sukcs. (Lounge/David Wulff)

    www.emvoid.de

    L 1 Reply Last reply
    0
    • M matthias s 0

      Hi folks, can somebody tell me why TextBoxes do not render the text (assigned through the Text property) properly when using new line escape sequence like in string s = "firstline\nsecondline";. How can I solve this? Thanks a lot in advance! Matthias

      If eell I ,nust draw to your atenttion to het fakt that I can splel perfrectly well - i;ts my typeying that sukcs. (Lounge/David Wulff)

      www.emvoid.de

      L Offline
      L Offline
      lesnikowski
      wrote on last edited by
      #2

      try using "firstline\r\nsecondline";.

      M 1 Reply Last reply
      0
      • L lesnikowski

        try using "firstline\r\nsecondline";.

        M Offline
        M Offline
        matthias s 0
        wrote on last edited by
        #3

        Correct! :cool: Thanks! Matthias

        If eell I ,nust draw to your atenttion to het fakt that I can splel perfrectly well - i;ts my typeying that sukcs. (Lounge/David Wulff)

        www.emvoid.de

        R 1 Reply Last reply
        0
        • M matthias s 0

          Correct! :cool: Thanks! Matthias

          If eell I ,nust draw to your atenttion to het fakt that I can splel perfrectly well - i;ts my typeying that sukcs. (Lounge/David Wulff)

          www.emvoid.de

          R Offline
          R Offline
          Roland Bar
          wrote on last edited by
          #4

          I would suggest to use System.Environment.NewLine to get the right newline for the system. Greets Roland

          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