LayerSetAxisTitleFreePos

LayerSetAxisTitleFreePos specifies if the position of the axis title can be modified using the mouse.

bool = LayerSetAxisTitleAutoPos(hLayer, ssXYZ, bFreePos)

Return Value

If the function succeeds, the return value is TRUE (1); otherwise it is FALSE (0).

Parameters

hLayer

Identifies the layer.

ssXYZ

ssXYZ is “X” for the x-axis, “Y” for the y-axis and “Z” for the z-axis.

bFreePos

If bFreePos is TRUE (1) the position can be modified using the mouse.

Example

Move the y axis title to the top of the diagram.

hLayer = 20;   // Handle retrieved from status bar

rvPS = OBJGetPosSize(hLayer);
LayerSetAxisTitleFreePos(hLayer, "Y", TRUE);
// returns a copy of the text object!
hText = LayerGetAxisTB(hLayer, "Y");
rvT_PS = OBJGetPosSize(hText);
TBSetAngle(hText, 0);
rvNewPos = [rvPS[1], rvPS[2]+rvPS[4], rvT_PS[3], rvT_PS[4]];
OBJSetPosSize(hText, rvNewPos);
TBSetAutoSize(hText, TRUE);
LayerSetAxisTB(hLayer, "Y", hText);
TBDestroy(hText); // delete the copy

History

Version Description
5.0.0 New

id-282353