Question listbox add items to top

andrews

Well-known member
Joined
Nov 22, 2011
Messages
132
Programming Experience
5-10
I have a question about adding items to listbox.
I guess it is very simple but I do not know.
When adding the items, the items comes at the bottom.
I want to see always the latest and they had to appear to the top.
How to do?
Thanks for any response
 
Hi,

You can use the items.insert method to specify where you want to add an item in the listbox. The following will always add items to the top of the listbox:-

ListBox1.Items.Insert(0,"New Value")

Cheers,

Ian
 
question listbox

Hi,

You can use the items.insert method to specify where you want to add an item in the listbox. The following will always add items to the top of the listbox:-

ListBox1.Items.Insert(0,"New Value")

Cheers,

Ian

Thanks very much
 
Back
Top