Worksheet::AutoSizeRow

Description

Autosizing height of worksheet row, both for data rows and label rows

Syntax

BOOL AutoSizeRow( int nRow = RCLT_COMMENT, int nLabel = 1, BOOL bUndo = false, DWORD dwCntrl = AS_NOWIDTH | AS_INVALIDATE )

Parameters

nRow
[input] 0-offset row or type depending on nLabel. If nLabel < 0, then it is data row so 0,1,2, if nLabel = 1, then Column label, so need to use RCLT_COMMENT etc
nLabel
[input] 0 for row labels, 1 for column labels, -1 if not label (data)
bUndo
[input] Indicates if the operation needs to support undo (TRUE for supporting)
dwCntrl
[input] to control if resize row height only, or column width etc, see AS_NOWIDTH enum

Return

TRUE on success, FALSE on failure.

Examples

EX1

// Before run the function, Firstly hide each label type.
// This function will show the comment label.
void Worksheet_AutoSizeRow_Ex1()
{
    Worksheet    wks = Project.ActiveLayer();
    if ( wks )
    {
        if( !wks.AutoSizeRow(RCLT_COMMENT, 1) )
            printf("Fail to autosize the height of worksheet comment!");
    }
}

Remark

See Also

OriginObject::AutoSize

header to Include

origin.h