2.2.4.22.29 Grid::PutLabelsByType

Description

Put labels of the specified type into all columns.

Syntax

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

Parameters

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

Return

TRUE for success.

Examples

EX1

void Grid_PutLabelsByType_ex1()
{
    Worksheet wks = Project.ActiveLayer();
    if ( wks )
    {
        wks.SetSize(-1, 2);
        StringArray arr1 = {"Comments1", "Comments2"};
                
        Grid grid;
        grid.Attach(wks);
        grid.PutLabelsByType(arr1, RCLT_COMMENT);
 
        StringArray arr2;
        BOOL    bRet = grid.GetLabelsByType(arr2, RCLT_COMMENT);
        if(bRet&&arr2[0] == "Comments1"&&arr2[1] == "Comments2");
			out_str("Success put lables!");
    }    
}

Remark

See Also

Grid::GetLabelsByType

Header to Included

origin.h