Groups | Blog | Home
all groups > dotnet compact framework > october 2006 >

dotnet compact framework : Listbox wrapping


drumred
10/7/2006 10:23:01 AM
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
drumred
10/8/2006 12:07:01 PM
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.

[quoted text, click to view]
AddThis Social Bookmark Button