- return false;
-}
-
-bool wxSlider::MSWOnScroll(int WXUNUSED(orientation), WXWORD wParam,
- WXWORD WXUNUSED(pos), WXHWND control)
-{
- return false;
+ // wxSL_AUTOTICKS is ignored - always on
+ // wxSL_LABELS is ignored - always off
+ // wxSL_LEFT is ignored - always off
+ // wxSL_RIGHT is ignored - always off
+ // wxSL_TOP is ignored - always off
+ // wxSL_SELRANGE is ignored - always off
+ // wxSL_VERTICAL is impossible in native form
+ wxCHECK_MSG(!(style & wxSL_VERTICAL), false, _T("non vertical slider on PalmOS"));
+
+ if(!wxControl::Create(parent, id, pos, size, style, validator, name))
+ return false;
+
+ FormType* form = (FormType*)GetParentForm();
+ if(form==NULL)
+ return false;
+
+ m_oldValue = m_oldPos = value;
+
+ wxCoord x = pos.x == wxDefaultCoord ? 0 : pos.x,
+ y = pos.y == wxDefaultCoord ? 0 : pos.y,
+ w = size.x == wxDefaultCoord ? 1 : size.x,
+ h = size.y == wxDefaultCoord ? 1 : size.y;
+
+ AdjustForParentClientOrigin(x, y);
+
+ SliderControlType *slider = CtlNewSliderControl (
+ (void **)&form,
+ GetId(),
+ feedbackSliderCtl,
+ NULL,
+ 0,
+ 0,
+ x,
+ y,
+ w,
+ h,
+ minValue,
+ maxValue,
+ 1,
+ value
+ );
+
+ if(slider==NULL)
+ return false;
+
+ SetInitialSize(size);
+ Show();
+ return true;