// and initialize everything
SetRange(minValue, maxValue);
SetValue(value);
- SetPageSize((maxValue - minValue)/10);
+ SetPageSize( wxMax(1, (maxValue - minValue)/10) );
// we need to position the labels correctly if we have them and if
// SetSize() hadn't been called before (when best size was determined by
if ( m_labels )
{
- ::SetWindowText((*m_labels)[SliderLabel_Value], Format(value).wx_str());
+ ::SetWindowText((*m_labels)[SliderLabel_Value], Format(value).t_str());
}
}
if ( m_labels )
{
::SetWindowText((*m_labels)[SliderLabel_Min],
- Format(ValueInvertOrNot(m_rangeMin)).wx_str());
+ Format(ValueInvertOrNot(m_rangeMin)).t_str());
::SetWindowText((*m_labels)[SliderLabel_Max],
- Format(ValueInvertOrNot(m_rangeMax)).wx_str());
+ Format(ValueInvertOrNot(m_rangeMax)).t_str());
}
// When emulating wxSL_INVERSE style in wxWidgets, we need to update the