I've been working on a program that represents float data in a wxGrid.
The data in the table is between a certain range. Cell color is defined by a gradient of color that corresponds to the value within a cell. As a user modifies the data in a cell, what I'd like to do is have the cell color change to the appropriate color.
I can't get the cell colors to change with table data
I've extended the gridTableBase class, and in my SetValue method I've tried a number of things to trigger a color change. Please note that I have also implemented my own wxGridCellAttrProvider if that helps.
Within my GridTableBase::SetValue...
*not exact code*
Code: Select all
wxGridCellAttrProvider *provider = this->GetAttrProvider();
wxGridCellAttr *attr = provider->GetAttr(row, col, wxGridCellAttr::Any);
attr->SetBackgroundColour(*NEW COLOR);
Thanks in advance!
-Eric-