]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/scrolbar.cpp
added automatic growing of in-place wxTextCtrls for generic wxListCtrl and wxTreeCtrl
[wxWidgets.git] / src / msw / scrolbar.cpp
index f5c9a867dde8b8d793abf80e9da5bdf94bd249d5..007c98067ffb9024d0ac6a5c106aea8755499e0d 100644 (file)
@@ -163,8 +163,12 @@ bool wxScrollBar::MSWOnScroll(int WXUNUSED(orientation), WXWORD wParam,
             scrollEvent = wxEVT_SCROLL_PAGEDOWN;
             break;
 
-        case SB_THUMBTRACK:
         case SB_THUMBPOSITION:
+            nScrollInc = pos - position;
+            scrollEvent = wxEVT_SCROLL_THUMBRELEASE;
+            break;
+
+        case SB_THUMBTRACK:
             nScrollInc = pos - position;
             scrollEvent = wxEVT_SCROLL_THUMBTRACK;
             break;
@@ -173,9 +177,10 @@ bool wxScrollBar::MSWOnScroll(int WXUNUSED(orientation), WXWORD wParam,
             nScrollInc = 0;
     }
 
-    if ( nScrollInc == 0 )
+    // don't process the event if there is no displacement,
+    // unless this is a thumb release event.
+    if (( nScrollInc == 0 ) && ( scrollEvent != wxEVT_SCROLL_THUMBRELEASE ))
     {
-        // no event to process, so don't process it
         return FALSE;
     }