grid->SetCellRenderer(4, 4, new MyGridCellRenderer);
grid->SetCellValue(3, 0, "0");
grid->SetCellRenderer(3, 0, new wxGridCellBoolRenderer);
grid->SetCellEditor(3, 0, new wxGridCellBoolEditor);
wxGridCellAttr *attr;
attr = new wxGridCellAttr;
attr->SetTextColour(*wxBLUE);
grid->SetColAttr(5, attr);
attr = new wxGridCellAttr;
attr->SetBackgroundColour(*wxRED);
grid->SetRowAttr(5, attr);
grid->SetCellValue(2, 4, "a wider column");
grid->SetColSize(4, 120);
grid->SetColMinimalWidth(4, 120);
grid->SetCellTextColour(5, 8, *wxGREEN);
grid->SetCellValue(5, 8, "Bg from row attr\nText col from cell attr");
grid->SetCellValue(5, 5, "Bg from row attr Text col from col attr and this text is so long that it covers over many many empty cells but is broken by one that isn't");
grid->SetColFormatFloat(6);
grid->SetCellValue(0, 6, "3.1415");
grid->SetCellValue(1, 6, "1415");
grid->SetCellValue(2, 6, "12345.67890");
grid->SetColFormatFloat(7, 6, 2);
grid->SetCellValue(0, 7, "3.1415");
grid->SetCellValue(1, 7, "1415");
grid->SetCellValue(2, 7, "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));