hi, i am adding items to a listbox like:ListBox1.Items.Add("test")
and i was wondering if there is a way to make it add items to the begining of the listbox instead of putting it at the end. Thanks
Printable View
hi, i am adding items to a listbox like:ListBox1.Items.Add("test")
and i was wondering if there is a way to make it add items to the begining of the listbox instead of putting it at the end. Thanks
This is a good question!
like this...
:)VB Code:
ListBox1.Items.Insert(0, "testing") '/// where 0 is the first index number.
try this
where <anyindex> is between 0 and listbox1.items.countCode:Private Sub btn_add2end_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_add2end.Click
ListBox1.Items.Insert(<any index>, "your item")
End Sub
he wants them at the beginning though ;)
so that'd be 0 rather than the ListBox1.Items.Count.Quote:
i was wondering if there is a way to make it add items to the begining of the listbox
yeah , fixed it
Thank you very much!!!:bigyello: