cooleo100d
02-12-2005, 02:24 AM
Hi,
I'm using visual basic 6. I have a list box, and I add some items to it like this:
list.AddItem "Item 1", 0
list.AddItem "Item 2", 1
list.AddItem "Item 3", 2
Then I have a button, and I want it so when the user clicks the button, I want the item thats selected to move up in position 1 slot. I tried something like this:
list.ListIndex = list.ListIndex - 1
But that just changes the selection bar thing, and not the position of the item.
How would I go about doing this?
Thanks for your help,
~David
I'm using visual basic 6. I have a list box, and I add some items to it like this:
list.AddItem "Item 1", 0
list.AddItem "Item 2", 1
list.AddItem "Item 3", 2
Then I have a button, and I want it so when the user clicks the button, I want the item thats selected to move up in position 1 slot. I tried something like this:
list.ListIndex = list.ListIndex - 1
But that just changes the selection bar thing, and not the position of the item.
How would I go about doing this?
Thanks for your help,
~David