void wxFlexGridSizer::AddGrowableRow( size_t idx, int proportion )
{
- wxCHECK_RET( idx < (size_t)GetRows(), "invalid row index" );
+ int nrows, ncols;
+ CalcRowsCols(nrows, ncols);
+ wxCHECK_RET( idx < (size_t)nrows, "invalid row index" );
+
wxASSERT_MSG( !IsRowGrowable( idx ),
"AddGrowableRow() called for growable row" );
m_growableRows.Add( idx );
void wxFlexGridSizer::AddGrowableCol( size_t idx, int proportion )
{
- wxCHECK_RET( idx < (size_t)GetCols(), "invalid column index" );
+ int nrows, ncols;
+ CalcRowsCols(nrows, ncols);
+ wxCHECK_RET( idx < (size_t)ncols, "invalid column index" );
+
wxASSERT_MSG( !IsColGrowable( idx ),
"AddGrowableCol() called for growable column" );
m_growableCols.Add( idx );