Move children if parent gets resized.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29776 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1472,6 +1472,16 @@ void wxWindowOS2::DoMoveWindow(
|
|||||||
RECTL vRect;
|
RECTL vRect;
|
||||||
wxWindow* pParent = GetParent();
|
wxWindow* pParent = GetParent();
|
||||||
|
|
||||||
|
/* Due to OS/2's inverted coordinate system, changing the height
|
||||||
|
of a window requires repositioning all it's children, e.g. if
|
||||||
|
you want a child of height 100 to be at the top left corner of
|
||||||
|
the parent you need to position the lower left corner of the
|
||||||
|
child at (0, (height of parent - 100)), so, obviously, if the
|
||||||
|
height of the parent changes, the child needs to be repositioned. */
|
||||||
|
int nHeightDelta;
|
||||||
|
GetSize(0, &nHeightDelta);
|
||||||
|
nHeightDelta = nHeight - nHeightDelta;
|
||||||
|
|
||||||
if (pParent && !IsKindOf(CLASSINFO(wxDialog)))
|
if (pParent && !IsKindOf(CLASSINFO(wxDialog)))
|
||||||
{
|
{
|
||||||
int nOS2Height = GetOS2ParentHeight(pParent);
|
int nOS2Height = GetOS2ParentHeight(pParent);
|
||||||
@@ -1620,6 +1630,7 @@ void wxWindowOS2::DoMoveWindow(
|
|||||||
MoveChildren(nYDiff);
|
MoveChildren(nYDiff);
|
||||||
::WinQueryWindowPos(GetHwnd(), &m_vWinSwp);
|
::WinQueryWindowPos(GetHwnd(), &m_vWinSwp);
|
||||||
}
|
}
|
||||||
|
MoveChildren(nHeightDelta);
|
||||||
} // end of wxWindowOS2::DoMoveWindow
|
} // end of wxWindowOS2::DoMoveWindow
|
||||||
|
|
||||||
//
|
//
|
||||||
|
Reference in New Issue
Block a user