Results 1 to 6 of 6

Thread: Can anyone...

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2000
    Location
    Israel
    Posts
    636

    Arrow

    Hi, Guys!

    Can anyone explain me how to write a text
    to a textbox with multiline.
    see what I meen:

    Example:
    Dim t as string
    t = "Yes " & chr(13)
    t = t & " No"
    text1.text = t

    the text1.multiline proprty is "true".

    what the program writes me in the text1 box is:

    |----------------|
    |Yes Some-sign No|
    |----------------|

    thank you,
    Arie.

    Visit: http://www.nip.to/camel2000
    NEW!!! Send your picture to the world.

  2. #2
    Hyperactive Member
    Join Date
    Mar 2000
    Posts
    292
    You may want something like this:

    Dim myString as String
    myString = "1st line" & vbNewLine & "second line"
    "People who think they know everything are a great annoyance to those of us who do."

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2000
    Location
    Israel
    Posts
    636

    Arrow

    Tell me somthing, noone.
    Is this works in VB version 4.0?
    In mine it doesn't.
    Do you know how to do it in version 4.0?

    If you do answer.

    Thank you,
    Arie.

    Visit: http://www.nip.to/camel2000
    NEW!!! Send your picture to the world.
    NEW!!! Euro 2000 - Always updated.

  4. #4
    Guest

    This should work

    The vbNewLine feature is not in VB4, therefor, this code below should work becauses it uses vbCrLf.

    Code:
    Dim MyString As String
    MyString = "1st line" & vbCrLf & "2nd line"
    
    Text1 = MyString

  5. #5
    New Member
    Join Date
    Jun 2000
    Posts
    6
    Hail,

    Megatron is correct. Or to see the numbers :

    Dim Txt as String
    Txt = "Line 1" & Chr(10) & Chr(13)
    Txt = Txt & "Line 2".

    This should display :

    Line 1
    Line 2

    -------

    Chr(10) is the Line Feed character.
    Chr(13) is the Carriage Return character - which you already new. I used to have the EXACT same problem as you for ages until i finaly figured it out.

    I REALLY hope this is correct. Becuase i have'nt checked it. LOL.

    Hope it helps.

    --------------
    Rowie


  6. #6

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2000
    Location
    Israel
    Posts
    636

    Wink Thank you!

    I thank you for the big help.
    Actually it was small but I looked
    for this for a long time.
    And it was so hard without this.

    I thank you again for helping.
    Arie.

    Visit: http://www.nip.to/camel2000
    NEW!!! Euro 2000
    NEW!!! Send your picture to the world.
    (more info about this in this website).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width