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. A new line in textbox control

A new line in textbox control

Scheduled Pinned Locked Moved C#
4 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
    Ahmed Ismail Mohamed
    wrote on last edited by
    #1

    Hi all, about using TextBox control: I want to know how I make each paragraph written in a separet line, i tried the escape seq. '\n' but it does not work, the compiler print in the text. thank you:) ** Ahmed Ismail **

    S S M 3 Replies Last reply
    0
    • A Ahmed Ismail Mohamed

      Hi all, about using TextBox control: I want to know how I make each paragraph written in a separet line, i tried the escape seq. '\n' but it does not work, the compiler print in the text. thank you:) ** Ahmed Ismail **

      S Offline
      S Offline
      Stefan Troschuetz
      wrote on last edited by
      #2

      Use "\r\n" or even better the Environment.NewLine constant.


      "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook

      www.troschuetz.de

      1 Reply Last reply
      0
      • A Ahmed Ismail Mohamed

        Hi all, about using TextBox control: I want to know how I make each paragraph written in a separet line, i tried the escape seq. '\n' but it does not work, the compiler print in the text. thank you:) ** Ahmed Ismail **

        S Offline
        S Offline
        Syed Shahid Hussain
        wrote on last edited by
        #3

        Environment.NewLine will definitely work I have used it several times. Good Luck Syed Shahid Hussain

        1 Reply Last reply
        0
        • A Ahmed Ismail Mohamed

          Hi all, about using TextBox control: I want to know how I make each paragraph written in a separet line, i tried the escape seq. '\n' but it does not work, the compiler print in the text. thank you:) ** Ahmed Ismail **

          M Offline
          M Offline
          Michael P Butler
          wrote on last edited by
          #4

          Using Environment.Newline is the best practise. Also make sure the Multiline[^] property of the control is set to true

          Michael CP Blog [^] Development Blog [^]

          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