Showheaders
show/hide column or row header
BOOL Showheaders( BOOL bShow, BOOL bUndo = FALSE, BOOL bColheaders = true )
TRUE if success else FALSE.
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); } }
Grid::IsheadersShown
origin.h