]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/newgrid/griddemo.cpp
Reverted wxString members to const wxChar * for struct BugsGridData
[wxWidgets.git] / samples / newgrid / griddemo.cpp
index 63a6e544df4131cb015347c585e9419886e6769a..739152eb6353b843c335b0fd3dbe03f1a46d7ba9 100644 (file)
@@ -188,7 +188,7 @@ GridFrame::GridFrame()
     logger->SetTimestamp( NULL );
 
     // this will create a grid and, by default, an associated grid
-    // table for string gs_dataBugsGrid
+    // table for strings
     grid->CreateGrid( 100, 100 );
 
     grid->SetRowSize( 0, 60 );
@@ -874,6 +874,7 @@ void BugsGridTable::SetValue( int row, int col, const wxString& value )
                     gd.severity = Sev_Normal;
                 }
             }
+            break;
 
         case Col_Summary:
             gd.summary = value;
@@ -1002,12 +1003,7 @@ BugsGridFrame::BugsGridFrame()
     grid->SetColAttr(Col_Priority, attrRangeEditor);
     grid->SetColAttr(Col_Severity, attrCombo);
 
-    grid->AutoSizeColumns();
+    grid->AutoSize();
 
-#if defined __WXMOTIF__
-    // MB: the grid isn't getting a sensible default size under wxMotif
-    int cw, ch;
-    GetClientSize( &cw, &ch );
-    grid->SetSize( cw, ch );
-#endif
+    Fit();
 }