- scrollEvent = wxEVT_SCROLL_THUMBTRACK;
- break ;
- default :
- wxFAIL_MSG(wxT("illegal scrollbar selector"));
- break ;
- }
-
- int new_pos = position + nScrollInc;
-
- if (new_pos < minPos)
- new_pos = minPos;
- if (new_pos > maxPos)
- new_pos = maxPos;
- if ( nScrollInc )
- SetThumbPosition(new_pos);
-
- wxScrollEvent event(scrollEvent, m_windowId);
- if ( m_windowStyle & wxHORIZONTAL )
- {
- event.SetOrientation( wxHORIZONTAL ) ;
- }
- else
- {
- event.SetOrientation( wxVERTICAL ) ;
- }
- event.SetPosition(new_pos);
- event.SetEventObject( this );
- wxWindow* window = GetParent() ;
- if (window && window->MacIsWindowScrollbar(this) )
- {
- // this is hardcoded
- window->MacOnScroll(event);
- }
- else
- GetEventHandler()->ProcessEvent(event);
+ if ( mouseStillDown )
+ scrollEvent = wxEVT_SCROLL_THUMBTRACK;
+ else
+ scrollEvent = wxEVT_SCROLL_THUMBRELEASE;
+ break ;
+ default :
+ wxFAIL_MSG(wxT("illegal scrollbar selector"));
+ break ;
+ }
+
+ int new_pos = position + nScrollInc;
+
+ if (new_pos < minPos)
+ new_pos = minPos;
+ if (new_pos > maxPos)
+ new_pos = maxPos;
+ if ( nScrollInc )
+ SetThumbPosition(new_pos);
+
+ wxScrollEvent event(scrollEvent, m_windowId);
+ if ( m_windowStyle & wxHORIZONTAL )
+ {
+ event.SetOrientation( wxHORIZONTAL ) ;
+ }
+ else
+ {
+ event.SetOrientation( wxVERTICAL ) ;
+ }
+ event.SetPosition(new_pos);
+ event.SetEventObject( this );
+ wxWindow* window = GetParent() ;
+ if (window && window->MacIsWindowScrollbar(this) )
+ {
+ // this is hardcoded
+ window->MacOnScroll(event);
+ }
+ else
+ GetEventHandler()->ProcessEvent(event);