gurehbgui
gurehbgui

Reputation: 14674

How to jump to the top of a ListBox?

i have a problem, i have a application with a listBox where are many items in, so it is possible to scroll.

when the user press a button a new item is added. now i need to to the following: when the user press the button and add a new item, the viewof the listBox should jump at the top of the list, so that the user if he scrolled down, is at the top again.

is this possible?

Upvotes: 0

Views: 63

Answers (1)

Peter Porfy
Peter Porfy

Reputation: 9030

Yes, you can do it.

Check out the ListBox.ScrollIntoView method.

Upvotes: 1

Related Questions