Use parents client size and origin in placement of controls.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31914 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -130,6 +130,13 @@ bool wxSlider::Create(wxWindow *parent, wxWindowID id,
|
||||
|
||||
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(),
|
||||
@@ -137,10 +144,10 @@ bool wxSlider::Create(wxWindow *parent, wxWindowID id,
|
||||
NULL,
|
||||
0,
|
||||
0,
|
||||
pos.x,
|
||||
pos.y,
|
||||
size.x,
|
||||
size.y,
|
||||
x,
|
||||
y,
|
||||
w,
|
||||
h,
|
||||
minValue,
|
||||
maxValue,
|
||||
1,
|
||||
@@ -150,6 +157,7 @@ bool wxSlider::Create(wxWindow *parent, wxWindowID id,
|
||||
if(slider==NULL)
|
||||
return false;
|
||||
|
||||
SetInitialBestSize(size);
|
||||
Show();
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user