Fix wxSlider::SetThumbLength() on wxMSW
It requires TBS_FIXEDLENGTH style. Call InvalidateBestSize because the size of the control might change. Call Layout in the widgets sample to adjust to the changed size. Use GetThumbLength() instead of the arbitrary defined THUMB size.
This commit is contained in:
@@ -543,6 +543,14 @@ void SliderWidgetsPage::DoSetThumbLen()
|
||||
}
|
||||
|
||||
m_slider->SetThumbLength(len);
|
||||
|
||||
if ( m_slider->GetThumbLength() != len )
|
||||
{
|
||||
wxLogWarning(wxString::Format("Invalid thumb length in slider: %d",
|
||||
m_slider->GetThumbLength()));
|
||||
}
|
||||
|
||||
Layout();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user