Add wxGrid::RefreshAttr() method to force attribute refresh.

A cached attribute may continue to be used even though the attribute returned
by a custom wxGridCellAttrProvider has changed so add a method to force wxGrid
to update the attribute by forgetting the cached copy.

Closes #12406.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65451 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2010-08-30 22:18:52 +00:00
parent bb612373c0
commit b99450eecb
3 changed files with 38 additions and 0 deletions

View File

@@ -1268,6 +1268,12 @@ public:
void SetRowAttr(int row, wxGridCellAttr *attr);
void SetColAttr(int col, wxGridCellAttr *attr);
// the grid can cache attributes for the recently used cells (currently it
// only caches one attribute for the most recently used one) and might
// notice that its value in the attribute provider has changed -- if this
// happens, call this function to force it
void RefreshAttr(int row, int col);
// returns the attribute we may modify in place: a new one if this cell
// doesn't have any yet or the existing one if it does
//