Hello,
Anyone know how to scroll down the listview by code?
Eg. I have 200 items in the listview. When I set the selectedItem to be
item 180, the user cannot see it if he don't scroll it down.
Thanks!
Re: ListView problem
Use the EnsureVisible method. Pass in the index of the item you want to
scroll into view.
____________________
Klaus H. Probst, MVP
那么C#中的DataGridView呢?
虽让DataGridView没有那么直接的方法但是还是可以变通实现的,如下:
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
arow.Selected = true;//选中某行
DataGridView.FirstDisplayedScrollingRowIndex = arow.Index; //让选中行显示在可视范围内
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
FirstDisplayedScrollingRowIndex 这个属性的意思蛮不好理解的.
如果你知道的更多,请留言给我!
共同进步哦!