Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 displaying Text in a scrolling text box...
Index -> Programming, Visual Basic and Other Basics -> Visual Basic Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
ZeroPaladn




PostPosted: Fri Nov 24, 2006 1:26 pm   Post subject: displaying Text in a scrolling text box...

How would you display text in a scrolling text box without either overwriting the existing text inside the text box or just being stuck right beside it? I know that calling...
vb6:
txtDisplay.Text = "woot"
txtDisplay.Text = "lol"

...will just output lol because it will overwrite the existing string inside the text box, but calling...
vb6:
txtDisplay.Text = "lol"
txtDisplay.Text = txtDisplay.Text + " omg"

...will put lol omg, but i want it to jump donw to the next line in the scrolling text box.

thanks guys!
Sponsor
Sponsor
Sponsor
sponsor
ZeroPaladn




PostPosted: Fri Nov 24, 2006 1:32 pm   Post subject: (No subject)

Sorry for the double post, but i figured it out, i need to use the command vbNewLine while declaring th text of the textbox...
VisualBASIC:
txtDisplay.Text = "lol" + vbNewLine
txtDisplay.Text = txtDisplay.Text + "omg" + vbNewLine

There, now others know how to do it.
cool dude




PostPosted: Fri Nov 24, 2006 3:47 pm   Post subject: (No subject)

ZeroPaladn wrote:
Sorry for the double post, but i figured it out, i need to use the command vbNewLine while declaring th text of the textbox...
VisualBASIC:
txtDisplay.Text = "lol" + vbNewLine
txtDisplay.Text = txtDisplay.Text + "omg" + vbNewLine

There, now others know how to do it.


Glad to see you figured it out. I'll just add for other people that to use vbNewLine you must ensure that the property on your textbox is set to multiline enabled.
Shaun Dreclin




PostPosted: Tue Dec 12, 2006 9:46 pm   Post subject: (No subject)

Embarassed Oh.. The many many times I have spent hours trying to figure out why new lines werent working.. The many many times I realised I forgot to set the text box to multi line.. Embarassed
cool dude




PostPosted: Wed Dec 13, 2006 3:25 pm   Post subject: (No subject)

Shaun Dreclin wrote:
Embarassed Oh.. The many many times I have spent hours trying to figure out why new lines werent working.. The many many times I realised I forgot to set the text box to multi line.. Embarassed


Now you know Wink
Display posts from previous:   
   Index -> Programming, Visual Basic and Other Basics -> Visual Basic Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 5 Posts ]
Jump to:   


Style:  
Search: