GetScrollInfo(...) work, but SetScrollInfo(...) wont,...

  • Thread starter Thread starter Kerem Gümrükcü
  • Start date Start date
K

Kerem Gümrükcü

Hi,

though i understand how to use the Get/SetScrollInfo(...) API,
i could not manage to save and restore the scroll state/position
of a ListView in .NET . I call GetSscrollInfo(...) which in turn
gives me the current scroll information of the ListView and then
i call SetScrollInfo(...) and it does not set the position anyway.
I starts at the begining of the ListView and focuses the first element
as if i didnt call anything of the API,...

I do this that way:

ListView.BeginUpdate();
GetScrollInfo(...)
Listview.Items.Clear()
//Build items again, same count!
SetScrollInfo(...)
ListView.EndUpdate()


It just wont work? What do i wrong here?


Regards

Kerem


--
 
Back
Top