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