GridControl::GetCellColor

 

Contents

Description

Gets color from a cell.

Syntax

void GetCellColor( int nRow, int nCol, uint * pnForeColor = NULL, uint * pnBackColor = NULL )

Parameters

nRow
[input] 0-offset row index
nCol
[input] 0-offset column index
pnForeColor
[output] pointer to receive foreground color
pnBackColor
[output] pointer to receive background color

Return

Examples

Example codes can be pasted to doExample() function in GridControl's examples to run

         int nRow = m_GridCtrl.GetRowOffset();
                int nCol = m_GridCtrl.GetColOffset();
                m_GridCtrl.SetCell(nRow, nCol, 123);
                m_GridCtrl.SetCellColor(nRow, nCol, COLOR_GREEN, COLOR_BLUE);
                
                int nFColor, nBColor;
                m_GridCtrl.GetCellColor(nRow, nCol, &nFColor, &nBColor);
                out_int(" foreground color=", nFColor);
                out_int(" background color=", nBColor);

Remark

See Also

GridControl::SetCellColor

header to Included

GridControl.h