CGridRowTraitText provides customization text and background at row-level.
More...
|
|
| CGridRowTraitText () |
| | CGridRowTraitText - Constructor.
|
| |
| virtual void | OnCustomDraw (CGridListCtrlEx &owner, NMLVCUSTOMDRAW *pLVCD, LRESULT *pResult) |
| | Overrides the custom draw handler, to allow custom coloring of rows.
|
| |
| void | SetRowColor (COLORREF textColor, COLORREF backColor) |
| | Sets the same row coloring for all rows.
|
| |
| void | SetAltRowColor (COLORREF textColor, COLORREF backColor) |
| | Activates alternate row coloring.
|
| |
|
void | SetInvertCellSelection (bool bValue) |
| |
|
bool | GetInvertCellSelection () const |
| |
|
| virtual bool | UpdateTextColor (int nRow, COLORREF &textColor) |
| | Changes the text color if one is specified.
|
| |
| virtual bool | UpdateBackColor (int nRow, COLORREF &backColor) |
| | Changes the background color if one is specified.
|
| |
|
virtual void | Accept (CGridRowTraitVisitor &visitor) |
| | Accept Visitor Pattern.
|
| |
|
|
CFont * | m_pOldFont |
| | Backup of the original font while drawing with specified font.
|
| |
|
bool | m_FontAllocated |
| | Specified font was allocated by the row trait.
|
| |
|
COLORREF | m_TextColor |
| | Text color to use for this row.
|
| |
|
COLORREF | m_BackColor |
| | Background color to use for this row.
|
| |
|
COLORREF | m_AltTextColor |
| | Alternate text color to use for every second row.
|
| |
|
COLORREF | m_AltBackColor |
| | Alternate background color to use for every second row.
|
| |
|
bool | m_InvertCellSelection |
| | When cell has focus in column, then the selection color is removed.
|
| |
CGridRowTraitText provides customization text and background at row-level.
| void CGridRowTraitText::OnCustomDraw |
( |
CGridListCtrlEx & |
owner, |
|
|
NMLVCUSTOMDRAW * |
pLVCD, |
|
|
LRESULT * |
pResult |
|
) |
| |
|
virtual |
Overrides the custom draw handler, to allow custom coloring of rows.
- Focus rectangle display
- Use font size to increase row-height, but keep cell font-size
- Alternate row coloring
- Parameters
-
| owner | The list control drawing |
| pLVCD | Pointer to NMLVCUSTOMDRAW structure |
| pResult | Modification to the drawing stage (CDRF_NEWFONT, etc.) |
Reimplemented from CGridRowTrait.
Reimplemented in CGridRowTraitXP.
| void CGridRowTraitText::SetAltRowColor |
( |
COLORREF |
textColor, |
|
|
COLORREF |
backColor |
|
) |
| |
Activates alternate row coloring.
- Parameters
-
| backColor | The background color to use for every second row |
| textColor | The text color to use for every second row |
| void CGridRowTraitText::SetRowColor |
( |
COLORREF |
textColor, |
|
|
COLORREF |
backColor |
|
) |
| |
Sets the same row coloring for all rows.
- Parameters
-
| backColor | The background color to use for all rows |
| textColor | The text color to use for all rows |
| bool CGridRowTraitText::UpdateBackColor |
( |
int |
nRow, |
|
|
COLORREF & |
backColor |
|
) |
| |
|
protectedvirtual |
Changes the background color if one is specified.
- Parameters
-
| nRow | The index of the row |
| backColor | Current background color |
- Returns
- New background color was specified (true / false)
| bool CGridRowTraitText::UpdateTextColor |
( |
int |
nRow, |
|
|
COLORREF & |
textColor |
|
) |
| |
|
protectedvirtual |
Changes the text color if one is specified.
- Parameters
-
| nRow | The index of the row |
| textColor | Current text color |
- Returns
- New text color was specified (true / false)