]> git.saurik.com Git - wxWidgets.git/commitdiff
Prevent scrolling back to the top when calling SetItemCount again
authorRobin Dunn <robin@alldunn.com>
Thu, 8 May 2003 06:29:39 +0000 (06:29 +0000)
committerRobin Dunn <robin@alldunn.com>
Thu, 8 May 2003 06:29:39 +0000 (06:29 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20547 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/listctrl.cpp

index 73d138f1e30eb2dc629009c47573e30a1004961e..3086c45c9b62cd324237adca35d70400cd16d493 100644 (file)
@@ -2350,7 +2350,7 @@ void wxListCtrl::SetItemCount(long count)
 {
     wxASSERT_MSG( IsVirtual(), _T("this is for virtual controls only") );
 
-    if ( !::SendMessage(GetHwnd(), LVM_SETITEMCOUNT, (WPARAM)count, 0) )
+    if ( !::SendMessage(GetHwnd(), LVM_SETITEMCOUNT, (WPARAM)count, LVSICF_NOSCROLL) )
     {
         wxLogLastError(_T("ListView_SetItemCount"));
     }