// splitter windows, but can't be used in a panel where a static box must be
// 'transparent' (panel paints the background for it)
#define wxCLIP_CHILDREN 0x00400000
+// Note we're reusing the wxCAPTION style because we won't need captions
+// for subwindows/controls
+#define wxCLIP_SIBLINGS 0x20000000
// Add this style to a panel to get tab traversal working outside of dialogs
// (on by default for wxPanel, wxDialog, wxScrolledWindow)
{ wxT("wxTRANSPARENT_WINDOW"), wxTRANSPARENT_WINDOW},
{ wxT("wxNO_BORDER"), wxNO_BORDER},
{ wxT("wxCLIP_CHILDREN"), wxCLIP_CHILDREN},
+ { wxT("wxCLIP_SIBLINGS"), wxCLIP_SIBLINGS},
{ wxT("wxTAB_TRAVERSAL"), 0}, // Compatibility only
{ wxT("wxTINY_CAPTION_HORIZ"), wxTINY_CAPTION_HORIZ},
rect = event.GetRect();
if (mainWindow)
- mainWindow->SetSize(rect.x, rect.y, rect.width, rect.height);
+ mainWindow->SetSize(rect.x, rect.y, wxMax(0, rect.width), wxMax(0, rect.height));
else if (lastAwareWindow)
{
// Fit the remaining space
- lastAwareWindow->SetSize(rect.x, rect.y, rect.width, rect.height);
+ lastAwareWindow->SetSize(rect.x, rect.y, wxMax(0, rect.width), wxMax(0, rect.height));
}
return TRUE;
msflags |= WS_CHILD | WS_VISIBLE;
if ( style & wxCLIP_CHILDREN )
msflags |= WS_CLIPCHILDREN;
+ if ( style & wxCLIP_SIBLINGS )
+ msflags |= WS_CLIPSIBLINGS;
bool want3D;
WXDWORD exStyle = Determine3DEffects(WS_EX_CLIENTEDGE, &want3D);