]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/grid/griddemo.cpp
Added support for the wxFRAME_FLOAT_ON_PARENT style
[wxWidgets.git] / samples / grid / griddemo.cpp
index 2102af618f278ab702d92d67948764f9f000cbfa..387fb57614446342c6b282f5ab21f7f4b76b13a5 100644 (file)
@@ -968,10 +968,8 @@ void GridFrame::OnCellValueChanged( wxGridEvent& ev )
     int row = ev.GetRow(),
         col = ev.GetCol();
 
-    wxString value = grid->GetCellValue(row, col);
-
     wxLogMessage(_T("Value changed for cell at row %d, col %d: now \"%s\""),
-                 row, col, (const wxChar*) value);
+                 row, col, grid->GetCellValue(row, col).c_str());
 
     ev.Skip();
 }
@@ -1446,8 +1444,7 @@ wxString BugsGridTable::GetColLabelValue( int col )
 // ----------------------------------------------------------------------------
 
 BugsGridFrame::BugsGridFrame()
-             : wxFrame(NULL, wxID_ANY, _T("Bugs table"),
-                       wxDefaultPosition, wxSize(500, 300))
+             : wxFrame(NULL, wxID_ANY, _T("Bugs table"))
 {
     wxGrid *grid = new wxGrid(this, wxID_ANY, wxDefaultPosition);
     wxGridTableBase *table = new BugsGridTable();
@@ -1467,8 +1464,6 @@ BugsGridFrame::BugsGridFrame()
     grid->SetColAttr(Col_Priority, attrRangeEditor);
     grid->SetColAttr(Col_Severity, attrCombo);
 
-    grid->SetMargins(0, 0);
-
     grid->Fit();
     SetClientSize(grid->GetSize());
 }