Layout things in wxMessageBox

Positioning of frames and dialogs


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2286 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
1999-04-26 13:10:49 +00:00
parent a89ae1e485
commit 227e5e99cd
9 changed files with 119 additions and 39 deletions

View File

@@ -1363,6 +1363,7 @@ bool wxSizer::LayoutPhase1(int *noChanges)
// Find the bounding box and set own size
int maxX = 0;
int maxY = 0;
wxNode *node = GetChildren().First();
while (node)
{
@@ -1374,10 +1375,11 @@ bool wxSizer::LayoutPhase1(int *noChanges)
maxX = (x + width);
if ((y+height) > maxY)
maxY = (y + height);
node = node->Next();
}
SetSize(GetBorderX(), GetBorderY(), maxX, maxY);
// If this is the only sizer for the parent, size the parent to this sizer.
if ( m_sizerParent && (m_sizerParent->GetSizer() == this) )
m_sizerParent->SetClientSize(maxX + 2*GetBorderX(), maxY + 2*GetBorderY());
@@ -1555,7 +1557,7 @@ bool wxRowColSizer::LayoutPhase1(int *noChanges)
int currentY = borderY;
int maxX = currentX;
int maxY = currentY;
wxNode *node = GetChildren().First();
while (node)
{