CellTextColor
Get or set the text color of a datasheet cell.
Requires Origin 8.5.0 or later.
BOOL CellTextColor(DWORD& dwColor, int nRow, int nCol, BOOL bGet=TRUE, BOOL bLabels=FALSE)
TRUE if success else FALSE.
EX1
void Grid_CellTextColor_ex1() { // Active worksheet or matrixsheet Datasheet ml = Project.ActiveLayer(); Grid grid; if( !grid.Attach(ml) ) return; // Reverse the text color and backgroud color in the cell at row 2, column 2 DWORD dwBkColor, dwTextColor; if( grid.CellBkColor(dwBkColor, 1, 1) && grid.CellTextColor(dwTextColor, 1, 1) ) { grid.CellBkColor(dwTextColor, 1, 1, FALSE); grid.CellTextColor(dwBkColor, 1, 1, FALSE); } }
Grid::CellBkColor
origin.h