Forum
Please
Log In
to post a new message or reply to an existing one. If you are not registered, please
register.
NOTE: Some forums may be read-only if you are not currently subscribed to
our technical support services.
Subject |
Author |
Date |
|
David Coleman
|
Jun 22, 2005 - 9:39 AM
|
I have successfully created a function to change the text colour of a grid cell. The issue I have is that I want the function to override the provided colour if the cell is selected or it is currently displaying expanded text. I want the function to force the text colour to white if the cell/row is selected, and force it to black if the text is expanded. I have tried testing the __EGCPF_HIGHLIGHTED_BY_SELECTED_ROW style to check if a cell/row is selected but this does absolutely nothing! Also how do I configure the grid to highlight a row when the mouse hovers over it? Any advice would be much appreciated. David.
|
|
Technical Support
|
Jun 23, 2005 - 10:04 AM
|
Try the code like this:bool bHighlightPressing =
( (dwHelperPaintFlags&(__EGCPF_HIGHLIGHTED_BY_PRESSED_COLUMN
|__EGCPF_HIGHLIGHTED_BY_PRESSED_ROW)) != 0
) ? true : false;
if( bHighlightPressing )
clrText = wndGrid.OnSiwGetSysColor( COLOR_HIGHLIGHTTEXT );
As for highlighting, use the HoverHighlightSet method to specify highlighted cells when the mouse pointer hovers over them:void HoverHighlightSet(
bool bHighlightSingleCellsInner = true,
bool bHighlightSingleCellsOuter = true,
bool bHighlightColumnCellsInner = true,
bool bHighlightColumnCellsOuter = true,
bool bHighlightRowCellsInner = true,
bool bHighlightRowCellsOuter = true
);
|
|