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
 
Back
Top