How to use textbox multiline

  • Thread starter Thread starter Jo
  • Start date Start date
J

Jo

Hi,

can someone tell me how to use the multiline textbox??

when i use following code:

textbox.multiline = true
textbox.text = "eeee" & vbcrlf
textbox.text = "rrrr" & vbcrlf
textbox.text = "dddd" & vbcrlf

i only see "dddd" in my textbox, the rest i don't see!
What is wrong??

Jo
 
Jo wrote:

textbox.multiline = true
textbox.text = "eeee" & vbcrlf
textbox.text = "rrrr" & vbcrlf
textbox.text = "dddd" & vbcrlf

i only see "dddd" in my textbox, the rest i don't see!
What is wrong??

textbox.text += "eeee" & vbcrlf
textbox.text += "rrrr" & vbcrlf
textbox.text += "dddd" & vbcrlf
 
Each time you are replacing the contents of the Text property - try this
instead:-
textbox.Text = "eeee" & vbcrlf
textbox.Text += "rrrr" & vbcrlf
etc

Also you may find a ListBox control is more suitable if you want a list of
text items.

Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top