2.2.4.46.55 Worksheet::LabelsMerge


Description

Get/Set label rows' dynamic merge state.

Syntax

int LabelsMerge( vector<int> & vnLabels, vector<int> & vnMerges, bool bSet )

Parameters

vnLabels
[input/output] if getting (bSet=false), will retreive the currently showing label rows
vnMerges
[input/output] dynamic merge state of the corresponding label row, values are GMC_HORZ etc
bSet
[input] to set dynamic merge state or to get

Return

when get, count of the label rows with dynamic merge > GMC_NONE, when set, count of label rows that the dynamic merge state has been modified

Examples

EX1

vector<int> vnLabels, vnMerges;
if(wksSource.LabelsMerge(vnLabels, vnMerges, false) > 0)
    wksDest.LabelsMerge(vnLabels, vnMerges, true);

EX2

void LabelsMerge_ex()
{
	Worksheet wks = Project.ActiveLayer();
	
	vector<int> vnLabels, vnMerges;
	int nRet = wks.LabelsMerge(vnLabels, vnMerges, false);

	vnMerges.Replace(GMC_HORZ, GMC_NONE, MATREPL_TEST_EQUAL);
	nRet = wks.LabelsMerge(vnLabels, vnMerges, true);
	wks.GetPage().Refresh(1);
}

Remark

See Also

Grid::MergeCells

Header to Included

origin.h