X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f4da9a943131e6654f05dbf0761e52593d30e5b5..64ea838d8f4d1853b7d850db93ee565e901d099a:/src/xrc/xh_slidr.cpp?ds=sidebyside diff --git a/src/xrc/xh_slidr.cpp b/src/xrc/xh_slidr.cpp index c34926df31..b888d71de9 100644 --- a/src/xrc/xh_slidr.cpp +++ b/src/xrc/xh_slidr.cpp @@ -23,6 +23,11 @@ #include "wx/slider.h" #endif +static const long DEFAULT_VALUE = 0; +static const long DEFAULT_MIN = 0; +static const long DEFAULT_MAX = 100; + + IMPLEMENT_DYNAMIC_CLASS(wxSliderXmlHandler, wxXmlResourceHandler) wxSliderXmlHandler::wxSliderXmlHandler() @@ -48,9 +53,9 @@ wxObject *wxSliderXmlHandler::DoCreateResource() control->Create(m_parentAsWindow, GetID(), - GetLong(wxT("value"), wxSL_DEFAULT_VALUE), - GetLong(wxT("min"), wxSL_DEFAULT_MIN), - GetLong(wxT("max"), wxSL_DEFAULT_MAX), + GetLong(wxT("value"), DEFAULT_VALUE), + GetLong(wxT("min"), DEFAULT_MIN), + GetLong(wxT("max"), DEFAULT_MAX), GetPosition(), GetSize(), GetStyle(), wxDefaultValidator, @@ -58,7 +63,7 @@ wxObject *wxSliderXmlHandler::DoCreateResource() if( HasParam(wxT("tickfreq"))) { - control->SetTickFreq(GetLong(wxT("tickfreq")), 0); + control->SetTickFreq(GetLong(wxT("tickfreq"))); } if( HasParam(wxT("pagesize"))) {