SetItemBounds( node->GetData(), x, y, w, h);
}
- y = y + m_rowHeights[r] + m_vgap;
+ if (m_rowHeights[r] != -1)
+ y = y + m_rowHeights[r] + m_vgap;
}
- x = x + m_colWidths[c] + m_hgap;
+ if (m_colWidths[c] != -1)
+ x = x + m_colWidths[c] + m_hgap;
}
}
int width = 0;
for (int col = 0; col < ncols; col++)
if ( m_colWidths[ col ] != -1 )
- width += m_colWidths[ col ] + ( col == ncols-1 ? 0 : m_hgap );
+ width += m_colWidths[ col ] + m_hgap;
+ if (width > 0)
+ width -= m_hgap;
int height = 0;
for (int row = 0; row < nrows; row++)
if ( m_rowHeights[ row ] != -1 )
- height += m_rowHeights[ row ] + ( row == nrows-1 ? 0 : m_vgap );
+ height += m_rowHeights[ row ] + m_vgap;
+ if (height > 0)
+ height -= m_vgap;
m_calculatedMinSize = wxSize( width, height );
return m_calculatedMinSize;
wxASSERT_MSG( box, wxT("wxStaticBoxSizer needs a static box") );
}
+wxStaticBoxSizer::wxStaticBoxSizer(int orient, wxWindow *win, const wxString& s)
+ : wxBoxSizer(orient),
+ m_staticBox(new wxStaticBox(win, wxID_ANY, s))
+{
+}
+
static void GetStaticBoxBorders( wxStaticBox *box,
int *borderTop,
int *borderOther)