I think I can see what you are trying to do.
You are using the listbox control, reduced in height so only one item is visible at any one time. By clicking the scrolls, you can search through the items in the collection, bringing one 'to the top'. But, I don't think you can programmatically work out which item is 'on top'.
Try using the domainupdown control instead. This will work. The selected item is by default, the item that is scrolled to.
I hope that make sense.
|