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. Visual Basic
  4. multiline in textboxes

multiline in textboxes

Scheduled Pinned Locked Moved Visual Basic
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.
  • S Offline
    S Offline
    sixecho
    wrote on last edited by
    #1

    when adding data from a list box to a text box the data is add on after the other eg. (123456789) i would like to know if there is a way to make them appear one under another eg. 1 2 3 4 5 6

    D L 2 Replies Last reply
    0
    • S sixecho

      when adding data from a list box to a text box the data is add on after the other eg. (123456789) i would like to know if there is a way to make them appear one under another eg. 1 2 3 4 5 6

      L Offline
      L Offline
      Luc Pattyn
      wrote on last edited by
      #2

      Hi, the magic value Environment.NewLine causes a string to span more than one line; use it at your leisure, every time you want to start a new line in a file, a textbox, etc. Like so: myTextBox.Text="1"+Environment.NewLine+(2).ToString(); BTW: some people use "\n" or '\n' ; on a Windows PC it would have a similar effect; but other systems may not like it that much. :)

      Luc Pattyn


      try { [Search CP Articles] [Search CP Forums] [Forum Guidelines] [My Articles] } catch { [Google] }


      1 Reply Last reply
      0
      • S sixecho

        when adding data from a list box to a text box the data is add on after the other eg. (123456789) i would like to know if there is a way to make them appear one under another eg. 1 2 3 4 5 6

        D Offline
        D Offline
        dptalt
        wrote on last edited by
        #3

        When your adding include chr(13) & chr(10) characters.

        C 1 Reply Last reply
        0
        • D dptalt

          When your adding include chr(13) & chr(10) characters.

          C Offline
          C Offline
          Colin Angus Mackay
          wrote on last edited by
          #4

          Better to use Environment.NewLine becuase it will return the correct value for the operating system in which you are running.


          Upcoming events: * Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ... "I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless." My website

          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