- wxDataViewIconText data( wxT("test"), m_icon[ row%2 ] );
- variant << data;
- }
- else if (col==2)
- {
- if (row >= m_array.GetCount())
- variant = wxT("plain");
- else
- variant = wxT("blue/green/red");
+ case Col_EditableText:
+ if (row >= m_textColValues.GetCount())
+ variant = wxString::Format( "virtual row %d", row );
+ else
+ variant = m_textColValues[ row ];
+ break;
+
+ case Col_IconText:
+ {
+ wxString text;
+ if ( row >= m_iconColValues.GetCount() )
+ text = "virtual icon";
+ else
+ text = m_iconColValues[row];
+
+ variant << wxDataViewIconText(text, m_icon[row % 2]);
+ }
+ break;
+
+ case Col_TextWithAttr:
+ {
+ static const char *labels[5] =
+ {
+ "blue", "green", "red", "bold cyan", "default",
+ };
+
+ variant = labels[row % 5];
+ }
+ break;
+
+ case Col_Custom:
+ variant = wxString::Format("%d", row % 100);
+ break;
+
+ case Col_Max:
+ wxFAIL_MSG( "invalid column" );