SetLabel
Set the column LongName.
BOOL SetLabel( LPCSTR lpcstrLabel )
TRUE if set the column label successfully, otherwise FALSE.
The error may simply be that Origin modified the name which is now in strColLabel.
Any more disastrous error should set the string to null.
EX1
// Worksheet with at least one column must exist in the project void Column_SetLabel_Ex1() { WorksheetPage wp = Project.WorksheetPages(0); if(!wp) return; Worksheet wks(wp.GetName()); string strLabel = "Time"; BOOL b = wks.Columns(0).SetLabel(strLabel); }
SetLabel is rarely used nowadays. It is replaced by SetLongName, SetUnits and SetComments.
Column::GetLabel, Column::SetLongName, Column::SetUnits, Column::SetComments
origin.h