GetLabel
Get the column LongName by reference.
Get the column LongName.
int GetLabel( string & strLabel )
string GetLabel( )
The length of the label, 0 if none, -1 if error.
The column label.
EX1
// Worksheet with at least one column must exist in the project void Column_GetLabel_Ex1() { WorksheetPage wp = Project.WorksheetPages(0); if(!wp) return; Worksheet wks(wp.GetName()); string strLabel; int i = wks.Columns(0).GetLabel(strLabel); printf("Column label for %s is %s\n", wks.Columns(0).GetName(), strLabel); }
EX2
// Worksheet with at least one column must exist in the project void Column_GetLabel_Ex2() { WorksheetPage wp = Project.WorksheetPages(0); if(!wp) return; Worksheet wks(wp.GetName()); string str = wks.Columns(0).GetLabel(); if(str.IsEmpty()) printf("Column %s does not have a label\n", wks.Columns(0).GetName()); else printf("Column %s has label %s\n", wks.Columns(0).GetName(), str); }
GetLabel function is rarely used nowadays. It was replaced by GetLongName, GetUnits and GetComments.
Column::SetLabel, Column::GetLongName, Column::GetUnits, Column::GetComments
origin.h