]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/gbsizer.cpp
move Ellipsize() to wxControl so it can be easily used by other controls
[wxWidgets.git] / src / common / gbsizer.cpp
index bb4f660670886f2433e2c40f770f7fede4834f87..eb23a2e37218d34bcca785b688a1dc0e96c3445f 100644 (file)
@@ -228,6 +228,18 @@ wxSizerItem* wxGridBagSizer::Add( wxGBSizerItem *item )
     if ( item->GetWindow() )
         item->GetWindow()->SetContainingSizer( this );
 
+    // extend the number of rows/columns of the underlying wxFlexGridSizer if
+    // necessary
+    int row, col;
+    item->GetEndPos(row, col);
+    row++;
+    col++;
+
+    if ( row > GetRows() )
+        SetRows(row);
+    if ( col > GetCols() )
+        SetCols(col);
+
     return item;
 }