KB-38309: Adding columns to a ListBox.

Question:

Can I add columns to a ListBox?

Solution:

Yes, you can. For example:

Screen.Item("ListBox1").ColumnCount = 3
Screen.Item("ListBox1").Clear()

Screen.Item("ListBox1").AddItem "Row 1, Col 1"
Screen.Item("ListBox1").List(0, 1) = "Row 1, Col 2"
Screen.Item("ListBox1").List(0, 2) = "Row 1, Col 3"

Screen.Item("ListBox1").AddItem "Row 2, Col 1"
Screen.Item("ListBox1").List(1, 1) = "Row 2, Col 2"
Screen.Item("ListBox1").List(1, 2) = "Row 2, Col 3"

Screen.Item("ListBox1").AddItem "Row 3, Col 1"
Screen.Item("ListBox1").List(2, 1) = "Row 3, Col 2"
Screen.Item("ListBox1").List(2, 2) = "Row 3, Col 3"
Print Friendly, PDF & Email

Este artigo foi útil? Was this helpful?

Classificação média - Average rating 0 / 5. Count: 0

Leave a Reply

Your email address will not be published.Required fields are marked *