CGXGridCore::ChangeRowHeaderStyle
BOOL ChangeRowHeaderStyle(const CGXStyle& style, GXModifyType mt = gxOverride, UINT nFlags = GX_UPDATENOW, GXCmdType ctCmd = gxDo);
style
A reference to a style-object which should be applied to the base-style.
mt
Modify-Type: gxOverride, gxApplyNew, gxCopy or gxExclude (see CGXStyle::ChangeStyle).
nFlags
-
Specifies the update technique:
- GX_UPDATENOW - updates the window immediately
GX_INVALIDATE - invalidates the window
ctCmd
Specifies if the executed command is undone (gxUndo), redone (gxRedo), executed the first time (gxDo) or rolled back (gxRollback).
Return Value
TRUE if the command has been successfully executed; it is FALSE if the command failed.
Remarks
Lets you change the row-header-style settings.
The row-header-style is the base-style for all row-headers in the grid. Every row-header-cell in the grid inherits those attributes from the row-header-style which are not explicitly specified in the cell or any other base-styles.
ChangeRowHeaderStyle will call ChangeBaseStyle to change the row-header-style. See ChangeBaseStyle for more information.
Example
This example illustrates how to change the default cell color in your grid:
// Change row-header-style
// The user can change the row-header-style with menu Format|Styles.
ChangeRowHeaderStyle( CGXStyle()
.SetInterior(RGB(255,255,255))
);
The next example illustrates how to specify a bold font for row-headers:
// Change default font to bold but leave all other
// font-settings unchanged.
ChangeRowHeaderStyle( CGXStyle( )
.SetFont(CGXFont( ).SetBold(TRUE))
);