Thread: newlines in textBox

  1. #1
    Registered User
    Join Date
    Sep 2001
    Posts
    173

    newlines in textBox

    hi:
    If I want to show the text in each line in the text, something like
    textbox1.text = "text1\ntext2;
    and it looks like:
    text1
    text2

    it didn't work for textbox but messageBox,
    so is there any format to do this?
    thank you
    Last edited by SuperNewbie; 07-26-2002 at 05:06 AM.
    Don't laugh at me,I am just a SuperNewbie.

  2. #2
    Registered User
    Join Date
    Jan 2002
    Posts
    387
    Did you make it a multiline text box?
    "There are three kinds of people in the world...
    Those that can count and those that can't."

  3. #3
    the hat of redundancy hat nvoigt's Avatar
    Join Date
    Aug 2001
    Location
    Hannover, Germany
    Posts
    3,130
    Instead of setting \n in your textbox, you can also add to the Lines-Property. For both variants, Multiline must be true.
    hth
    -nv

    She was so Blonde, she spent 20 minutes looking at the orange juice can because it said "Concentrate."

    When in doubt, read the FAQ.
    Then ask a smart question.

  4. #4
    Registered User
    Join Date
    Sep 2001
    Posts
    173
    yes, I've set multiline to true,and what do you mean "you can also add to the Lines-Property", can you explain that? thank you
    Don't laugh at me,I am just a SuperNewbie.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 2
    Last Post: 04-02-2009, 04:40 AM
  2. Replies: 5
    Last Post: 03-02-2009, 08:33 AM
  3. Problem with a multiline textbox
    By Zeokat in forum C# Programming
    Replies: 4
    Last Post: 10-24-2008, 01:14 PM
  4. inserting text in a textbox
    By Rune Hunter in forum C# Programming
    Replies: 1
    Last Post: 01-07-2006, 05:32 PM
  5. How would I add a textbox?
    By -KEN- in forum C# Programming
    Replies: 2
    Last Post: 11-13-2001, 02:02 PM