+ // 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, wxT("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);
+
+#ifdef __WXPALMOS6__
+ SliderControlType *slider = CtlNewSliderControl (
+ (void **)&form,
+ GetId(),
+ feedbackSliderCtl,
+ NULL,
+ 0,
+ 0,
+ x,
+ y,
+ w,
+ h,
+ minValue,
+ maxValue,
+ 1,
+ value
+ );
+#else // __WXPALMOS5__
+ //SliderControlType *CtlNewSliderControl (void **formPP, UInt16 ID, ControlStyleType style, DmResID thumbID,
+ // DmResID backgroundID, Coord x, Coord y, Coord width, Coord height, UInt16 minValue, UInt16 maxValue,
+ // UInt16 pageSize, UInt16 value);
+ SliderControlType *slider = CtlNewSliderControl ((void **)&form,
+ GetId(),
+ feedbackSliderCtl,//style
+ 0,//thumbID
+ 0,//backgroundid
+ x, y, w, h, minValue, maxValue, 1, value);
+#endif // __WXPALMOS6__/__WXPALMOS5__
+
+ if(slider==NULL)
+ return false;
+
+ SetInitialSize(size);
+ Show();
+ return true;