GetShowLabels
Get all show column or row labels
BOOL GetShowLabels( vector<int> & vnTypes, BOOL bCol = true )
TRUE if success else FALSE.
EX1
void Grid_GetShowLabels_ex2(bool bCol = true) { Worksheet wks = Project.ActiveLayer(); if(wks) { Grid gg; gg.Attach(wks); vector<int> vnTypes; gg.GetShowLabels(vnTypes, bCol); } }
EX2
// This example creates a worksheet with 3 columns. Then adds two user defined parameters to the row label. void Grid_SetUserDefinedLabelNames_ex1() { Worksheet wks = Project.ActiveLayer(); if(wks) { Worksheet wks; wks.Create("Origin", CREATE_VISIBLE); wks.AddCol(); Grid gg; gg.Attach(wks); // attach the grid to the worksheet vector<string> vsUDLs = {"Operator", "MachineID"}; gg.SetUserDefinedLabelNames(vsUDLs); // Add two user defined labels. vector<int> vnTypes; gg.GetShowLabels(vnTypes, TRUE); // Get the current showing column labels. vnTypes.Add(RCLT_UDL); vnTypes.Add(RCLT_UDL+1); gg.SetShowLabels(vnTypes); // Set the showing column labels wks.GetPage().Refresh(); } }
Grid::IsLabelsShown, Grid::ShowLabels, Grid::SetShowLabels
origin.h