Column::SetJustify

Description

Set the column justification.

Syntax

BOOL SetJustify( int iJustify )

Parameters

iJustify
[input] enum{
COL_JUSTIFY_RIGHT = 0,
COL_JUSTIFY_LEFT,
COL_JUSTIFY_CENTER
};

Return

TRUE if set the column justify successfully, otherwise FALSE.

Examples

EX1

// Worksheet with at least one column must exist in project
// Example cycles jsutification through each type
void    Column_SetJustify_Ex1()
{
    WorksheetPage wp = Project.WorksheetPages(0);
    if(!wp)
        return;
    
    Worksheet wks(wp.GetName());
    int iJustify = wks.Columns(0).GetJustify();
    iJustify += 1;
    if(iJustify > 2) 
        iJustify -= 3;
    BOOL bResult = wks.Columns(0).SetJustify(iJustify);
    printf("Column %s is using justify type %u\n", wks.Columns(0).GetName(),iJustify);
}

Remark

Set the column justification.

See Also

Column::GetJustify

header to Include

origin.h