grid->SetColSize(4, 120);
grid->SetColMinimalWidth(4, 120);
+ grid->SetColFormatFloat(5);
+ grid->SetCellValue(0, 5, "3.1415");
+ grid->SetCellValue(1, 5, "1415");
+ grid->SetCellValue(2, 5, "12345.67890");
+
+ grid->SetColFormatFloat(6, 6, 2);
+ grid->SetCellValue(0, 6, "3.1415");
+ grid->SetCellValue(1, 6, "1415");
+ grid->SetCellValue(2, 6, "12345.67890");
+
wxBoxSizer *topSizer = new wxBoxSizer( wxVERTICAL );
topSizer->Add( grid,
1,
void GridFrame::DeleteSelectedRows( wxCommandEvent& WXUNUSED(ev) )
{
+#if 0
if ( grid->IsSelection() )
{
int topRow, bottomRow, leftCol, rightCol;
grid->GetSelection( &topRow, &leftCol, &bottomRow, &rightCol );
grid->DeleteRows( topRow, bottomRow - topRow + 1 );
}
+#endif
}
void GridFrame::DeleteSelectedCols( wxCommandEvent& WXUNUSED(ev) )
{
+#if 0
if ( grid->IsSelection() )
{
int topRow, bottomRow, leftCol, rightCol;
grid->GetSelection( &topRow, &leftCol, &bottomRow, &rightCol );
grid->DeleteCols( leftCol, rightCol - leftCol + 1 );
}
+#endif
}
s = wxGetTextFromUser( "Size of the table to create",
"Size:",
s );
-
+
s.ToLong( &s_sizeGrid );
-
+
#else
s_sizeGrid = wxGetNumberFromUser("Size of the table to create",
"Size: ",
s_sizeGrid,
0, 32000, this);
#endif
-
+
if ( s_sizeGrid != -1 )
{
BigGridFrame* win = new BigGridFrame(s_sizeGrid);
static struct BugsGridData
{
int id;
-#ifndef __BORLANDC__
- wxString
-#else
- const wxChar *
-#endif
- summary;
+ wxChar summary[80];
Severity severity;
int prio;
-#ifndef __BORLANDC__
- wxString
-#else
- const wxChar *
-#endif
- platform;
+ wxChar platform[12];
bool opened;
} gs_dataBugsGrid [] =
{
// fall thorugh (TODO should be a list)
case Col_Summary:
+ return wxString::Format(_T("%s:80"), wxGRID_VALUE_STRING);
+
case Col_Platform:
- return wxGRID_VALUE_STRING;
+ return wxString::Format(_T("%s:all,MSW,GTK,other"), wxGRID_VALUE_CHOICE);
case Col_Opened:
return wxGRID_VALUE_BOOL;
break;
case Col_Summary:
- gd.summary = value;
+ wxStrncpy(gd.summary, value, WXSIZEOF(gd.summary));
break;
case Col_Platform:
- gd.platform = value;
+ wxStrncpy(gd.platform, value, WXSIZEOF(gd.platform));
break;
}
}
grid->SetMargins(0, 0);
grid->Fit();
- Fit();
+ wxSize size = grid->GetSize();
+ size.x += 10;
+ size.y += 10;
+ SetClientSize(size);
}