1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Hi Guest, welcome to the TES Community!

    Connect with like-minded professionals and have your say on the issues that matter to you.

    Don't forget to look at the how to guide.

    Dismiss Notice

How do you add a text box with multiple lines in VB express

Discussion in 'Computing and ICT' started by autismuk, May 25, 2011.

  1. .NET goes partially towards making its display objects proper objects. VB6 was simply a 1-1 mapping of the API ; .NET has an Items property which has the displayed items as a collection.
    It's still not right, Java does it properly, but it's better as it is abstracting data storage from the control itself.
    So you want ListBox1.Items.Add("Hello world")
    I think :)

  2. Alternatively, if the coding is still not recognising the method (possibly due to needing to set the Sorted property to true) you can also add items to the list such as Hello by clicking on the arrow on the actual listbox control and selecting Edit Items. Then you can type in as many strings as you want to appear in the list.
  3. Tosha

    Tosha New commenter

    Nice one, so you add strings to the collection populating the listbox rather than the listbox.
    Must admit from a Java - C++ - C background VB takes a bit of getting used to, though I think it will motivate the kids more than Python.
  4. lstString.Items.Add(<font size="2" color="#a31515">"hello"</font><font size="2">)
    lstString.Items.Add(<font size="2" color="#a31515">"hello"</font>)

Share This Page