- grid->SetColFormatFloat(6, 6, 2);
- grid->SetCellValue(0, 6, "3.1415");
- grid->SetCellValue(1, 6, "1415");
- grid->SetCellValue(2, 6, "12345.67890");
+ grid->SetColFormatFloat(6);
+ grid->SetCellValue(0, 6, _T("3.1415"));
+ grid->SetCellValue(1, 6, _T("1415"));
+ grid->SetCellValue(2, 6, _T("12345.67890"));
+
+ grid->SetColFormatFloat(7, 6, 2);
+ grid->SetCellValue(0, 7, _T("3.1415"));
+ grid->SetCellValue(1, 7, _T("1415"));
+ grid->SetCellValue(2, 7, _T("12345.67890"));
+
+ const wxString choices[] =
+ {
+ _T("Please select a choice"),
+ _T("This takes two cells"),
+ _T("Another choice"),
+ };
+ grid->SetCellEditor(4, 0, new wxGridCellChoiceEditor(WXSIZEOF(choices), choices));
+ grid->SetCellSize(4, 0, 1, 2);
+ grid->SetCellValue(4, 0, choices[0]);
+ grid->SetCellOverflow(4, 0, FALSE);
+
+ grid->SetCellSize(7, 1, 3, 4);
+ grid->SetCellAlignment(7, 1, wxALIGN_CENTRE, wxALIGN_CENTRE);
+ grid->SetCellValue(7, 1, _T("Big box!"));