Grid::Showheaders

Description

show/hide column or row header

Syntax

BOOL Showheaders( BOOL bShow, BOOL bUndo = FALSE, BOOL bColheaders = true )

Parameters

bShow
[input] to show or hide
bUndo
[input] support undo mechanism
bColheaders
[input] for column header or row header

Return

TRUE if success else FALSE.

Examples

EX1

//before execute the function, there must exist a workbook
void Grid_Showheaders_ex1()
{
        Worksheet wks = Project.ActiveLayer();
    if(wks)
    {
        Grid gg;
        gg.Attach(wks, 1);
 
        bool    bColheaders = true;
        gg.Showheaders(!gg.IsheadersShown(bColheaders), false, bColheaders);
 
        bColheaders = false;//row header
        gg.Showheaders(!gg.IsheadersShown(bColheaders), false, bColheaders);
    }
}

EX2

void Grid_Showheaders_ex2()
{
    Worksheet wks = Project.ActiveLayer();
    if(wks && wks.GetSystemParam(0) & WP_SHEET_HIERARCHY)
    {
        Grid gg;
        gg.Attach(wks, 1);
        
        bool    bColheaders = true;
        gg.Showheaders(!gg.IsheadersShown(bColheaders), false, bColheaders);
        
        bColheaders = false;//row header
        gg.Showheaders(!gg.IsheadersShown(bColheaders), false, bColheaders);
    }
}

Remark

See Also

Grid::IsheadersShown

header to Include

origin.h