diff --git a/src/msw/slider.cpp b/src/msw/slider.cpp index aea17963ba..2afb961fd2 100644 --- a/src/msw/slider.cpp +++ b/src/msw/slider.cpp @@ -620,6 +620,14 @@ void wxSlider::SetRange(int minValue, int maxValue) if ( m_labels ) { + Move(wxDefaultPosition); // Force a re-layout the labels. + + // Update the label with the value adjusted by the control as + // old value can be out of the new range. + if ( HasFlag(wxSL_VALUE_LABEL) ) + { + SetValue(GetValue()); + } ::SetWindowText((*m_labels)[SliderLabel_Min], Format(ValueInvertOrNot(m_rangeMin)).t_str()); ::SetWindowText((*m_labels)[SliderLabel_Max],