Column::CopyDataFormat

Description

Copy column format from source.

Syntax

void CopyDataFormat( Column & colSrc, BOOL bForceSubformatUpdate = TRUE, BOOL bUndo = FALSE )

Parameters

colSrc
[input]Source column to copy from.
bForceSubformatUpdate
[input]Force update subformat or not.
bUndo
[input] whether the action should be undoable.

Return

None

Examples

EX1

void Column_CopyDataFormat_ex1()
{
    //set all the columns the same format as the first column
    Worksheet wks = Project.ActiveLayer();
    if ( wks )
    {
        Column colSrc(wks, 0);
        int nNumCols = wks.GetNumCols();
        for ( int iCol = 0; iCol < nNumCols; iCol++ )
        {
            Column colDst(wks, iCol);
            colDst.CopyDataFormat(colSrc);
        }
    }
}

Remark

See Also

header to Included

origin.h