Listbox wrapping

G

Guest

How can you wrap the selected item with a listbox? For instance, if you go
to the end of the listbox items and seletect 'Down' again, I'd like to wrap
back to item '0'. Thanks
 
G

Guest

Still no luck with this. If I am at selecteditem = 0 or selecteditem = -1 in
a listbox and I go up in the list I would like to wrap to the end of the
list. If I put in code for keys.up, such as:

if listbox.SelectedIndex = 0 then
listbox.selectedindex = listbox.items.count -1
endif

and I step through the code it performs and the selected item becomes the
end of the list. However, after then keydown event runs it seems that
another event is firing to once again run a keyup. The result is that I end
up not on the last item in my list but the next to last item. I don't seem
to be able to find this second event and prevent it from running. I
appreciate any help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top