- if(!CreateControl(parent,winid,pos,size,style,validator,name))
+ NSControlSize controlSize = NSRegularControlSize;
+ wxSize adjustedSize(size);
+ wxPoint adjustedPos(pos);
+
+ if ((style & wxSB_HORIZONTAL) && ((size.GetHeight() != wxDefaultCoord) || (size.GetHeight() == -1)))
+ {
+ controlSize = AdjustDimension(adjustedPos.y, adjustedSize, &wxSize::GetHeight, &wxSize::SetHeight);
+ }
+ else if ((style & wxSB_VERTICAL) && (size.GetWidth() != wxDefaultCoord || (size.GetWidth() == -1)))
+ {
+ controlSize = AdjustDimension(adjustedPos.x, adjustedSize, &wxSize::GetWidth, &wxSize::SetWidth);
+ }
+
+ if(!CreateControl(parent,winid,adjustedPos,adjustedSize,style,validator,name))