Make slider thumb could moving when use mouse drag it, and also set the slider value according to the thumb position
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77808 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -239,7 +239,7 @@ bool wxScrollThumb::HandleMouseMove(const wxMouseEvent& event) const
|
|||||||
{
|
{
|
||||||
if ( HasCapture() )
|
if ( HasCapture() )
|
||||||
{
|
{
|
||||||
if ( (m_captureData->m_shaftPart == Shaft_Thumb) && event.Moving() )
|
if ( (m_captureData->m_shaftPart == Shaft_Thumb) && event.Dragging() )
|
||||||
{
|
{
|
||||||
// make the thumb follow the mouse by keeping the same offset
|
// make the thumb follow the mouse by keeping the same offset
|
||||||
// between the mouse position and the top/left of the thumb
|
// between the mouse position and the top/left of the thumb
|
||||||
|
@@ -804,11 +804,6 @@ bool wxSlider::PerformAction(const wxControlAction& action,
|
|||||||
action == wxACTION_SLIDER_THUMB_MOVE )
|
action == wxACTION_SLIDER_THUMB_MOVE )
|
||||||
{
|
{
|
||||||
scrollEvent = wxEVT_SCROLL_THUMBTRACK;
|
scrollEvent = wxEVT_SCROLL_THUMBTRACK;
|
||||||
|
|
||||||
// we shouldn't generate a command event about this change but we still
|
|
||||||
// should update our value and the slider appearance
|
|
||||||
valueChanged = false;
|
|
||||||
m_value =
|
|
||||||
value = (int)numArg;
|
value = (int)numArg;
|
||||||
Refresh();
|
Refresh();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user