chronobyte
Programmer
Hi, does anybody know how to programmatically scroll a list view control to the selected item when it is out of view?
I'm working on an application that perform item search in a list view. When the item is found I can programmatically highlight the item and set focus on the selected item. However for the life of me I can't figure out how to bring the item into view when the item selected happens to be outside the control's view port. The control doesn't automaticaly scroll for you.
I'm looking for something equivalent to the TextBox class' ScrollToCaret() method. Or if there isn't one, does anybody have a trick for doing that?
Any tips will be greatly appreciated, thanks!
I'm working on an application that perform item search in a list view. When the item is found I can programmatically highlight the item and set focus on the selected item. However for the life of me I can't figure out how to bring the item into view when the item selected happens to be outside the control's view port. The control doesn't automaticaly scroll for you.
I'm looking for something equivalent to the TextBox class' ScrollToCaret() method. Or if there isn't one, does anybody have a trick for doing that?
Any tips will be greatly appreciated, thanks!