OriginObject::SetComments

Description

Sets the comments with a text string to an object that supports Comments

Syntax

BOOL SetComments( LPCSTR lpcszComments )

Parameters

lpcszComments
[input]pointer to the comments to set

Return

TRUE if OK, FALSE if object does not support comments.

Examples

EX1

// Worksheet with at least one column should be active
void OriginObject_SetComments_Ex1()
{
    string str;
    str = "Workbook Comment\r\nThis is a test of some comments\r\nWhich can have multiple lines";
    Page pg = Project.Pages();
    if(pg)
        pg.SetComments(str);
    Worksheet wks = Project.ActiveLayer();
    Column col(wks, 0);
    str = "Column Comment\r\nThis is a test of some comments\r\nWhich can have multiple lines";
    if(col)
        col.SetComments(str);
    pg.Refresh();
}

Remark

Sets the comments with a text string to an object that supports Comments

Only Column and Page objects support comments

See Also

OriginObject::GetComments

header to Include

origin.h