PDA

Click to See Complete Forum and Search --> : Can anyone...


Arie
Jun 25th, 2000, 02:37 AM
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.

noone
Jun 25th, 2000, 02:42 AM
You may want something like this:

Dim myString as String
myString = "1st line" & vbNewLine & "second line"

Arie
Jun 26th, 2000, 02:56 AM
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.

Jun 26th, 2000, 03:29 AM
The vbNewLine feature is not in VB4, therefor, this code below should work becauses it uses vbCrLf.


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

Text1 = MyString

Rowie
Jun 26th, 2000, 08:01 PM
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

Arie
Jun 27th, 2000, 03:22 AM
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).