2.2.4.2.4 AxisObject::GetTitleObject

Description

get the axis title object. If the object is not existed, will create a new one named by lpcszDefaultText.

Syntax

GraphObject GetTitleObject( LPCSTR lpcszDefaultText = NULL )

Parameters

lpcszDefaultText
[input] The default text, used only when the title object does NOT exist.

Return

Return the title text object, if the title object does not exist and the input text was invalid/empty, the returned object is invalid.

Examples

//Get Y axis's title Object in the active graph layer.
void AxisObject_GetTitleObject_Ex1()
{
    GraphObject    go; // Declare GraphObject
    GraphLayer gl = Project.ActiveLayer();    
    
    AxisObject aoY; //Declare AxisObject
    aoY = gl.YAxis.AxisObjects(AXISOBJPOS_AXIS_FIRST);
    go = aoY.GetTitleObject();
    out_str(go.Text);
}

Remark

See Also

Header to Included

origin.h