2.2.4.22.14 Grid::GetLabelsByType

Description

Get labels of the specified type for all columns.

Syntax

int	GetLabelsByType(StringArray& arr, int nType, BOOL bCol = TRUE)

Parameters

arr
[output] vector string to hold column labels
nType
[input] Label type specified
bCol
[input] TRUE for column label ( Until now, only column label is supported in Origin)

Return

Number of column labels for the specified label type.

Examples

//Get the comment labels in the active worksheet.
void Grid_GetLabelsByType_Ex1()
{
	Worksheet wks = Project.ActiveLayer();
	if(wks)
	{
		Grid gg;
		gg.Attach(wks);
		vector<string> vs;
		gg.GetLabelsByType(vs, RCLT_COMMENT);
	
		for(int ii=0; ii<vs.GetSize(); ii++)
			out_str(vs[ii]);
		
	}
}

Remark

See Also

Grid::PutLabelsByType

Header to Included

origin.h