Added ability for tables, grids, editors and renderers to handle nonstring data.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6195 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2000-02-21 23:17:40 +00:00
parent e0a4aa8a21
commit f2d7623799
4 changed files with 385 additions and 101 deletions

View File

@@ -121,6 +121,24 @@ public:
// memory
// ----------------------------------------------------------------------------
class SimpleTable : public wxGridStringTable {
public:
SimpleTable( int numRows, int numCols )
: wxGridStringTable( numRows, numCols ) {}
// override this to fake a row as all bools
wxString GetTypeName( int row, int col )
{
if (row == 8)
return wxT("bool");
else if (row == 9 && col == 1)
return wxT("unknown type"); // to test fallback
else
return wxGridStringTable::GetTypeName(row, col);
}
};
class BigGridTable : public wxGridTableBase
{
public:
@@ -128,7 +146,6 @@ public:
long GetNumberRows() { return m_sizeGrid; }
long GetNumberCols() { return m_sizeGrid; }
wxString GetValue( int row, int col )
{
return wxString::Format("(%d, %d)", row, col);