Hello,
I have four items that are in a list box and are being displayed through code not static items. My question is how to space these four items. See example below,
Item1
Item2
Item3
Item4
I am trying to accomplish and form of spacing at my discretion, like so...
Item1
Item2
Item3
Item4
Any suggestions would be helpful. Lastly, these items are not displayed using the collection
I am using VB.NET 2008
Thanks in advance.
Quick one about list box.
Started by yourmom615, Nov 30 2010 08:42 PM
1 reply to this topic
#1
Posted 30 November 2010 - 08:42 PM
|
|
|
#2
Posted 03 December 2010 - 07:06 PM
How about :
or if you are using a loop:
Hope this helps
ListBox1.Items.Add("one")
ListBox1.Items.Add(ControlChars.NewLine)
ListBox1.Items.Add("two")
ListBox1.Items.Add(ControlChars.NewLine)
ListBox1.Items.Add("three")
ListBox1.Items.Add(ControlChars.NewLine)
ListBox1.Items.Add("four")
ListBox1.Items.Add(ControlChars.NewLine)
ListBox1.Items.Add("five")
or if you are using a loop:
Dim counter As Integer Do While counter < 5 ListBox1.Items.Add(counter) ListBox1.Items.Add(ControlChars.NewLine) counter = counter + 1 Loop
Hope this helps


Sign In
Create Account


Back to top









