The ListBox is automatically scrolling to put the focused item in view when it redraws. But I don’t want this to occur. I want the scroll position to stay as the user left it. So to do this, I think that I need to clear the focused item. But I don’t see any way to do this.
Share
The default behavior of a listbox is not to scroll the currently selected item into view. Usually you have to write some support code to do this.
If you are setting the selected index in code, the listbox will automatically scroll to that position. So look for any code where you’re setting the selected item/index. You may need to save and restore the scroll position if you can’t avoid setting the selected index.