LayerSetAxisTB¶
LayerSetAxisTB copies the specified text object into the axis title.
-
bool = LayerSetAxisTB(hLayer, ssXYZ, hText)
Return Value
If the function succeeds, the return value is TRUE (1); otherwise it is FALSE (0).
Parameters
-
hLayer
hLayer is the handle of a diagram (layer).
-
ssXYZ
ssXYZ is “X” for the x-axis, “Y” for the y-axis and “Z” for the z-axis.
-
hText
hText is the handle of a text object.
Example
//hPage = auto_LoadTemplate(...)
hPage = 20; // Handle retrieved from status bar
hLayer = PageGetLayerHandle(hPage, "Diagram1");
hText = LayerGetAxisTB(hLayer, "X");
TBSetText(hText, "Speed");
TBSetAlignHorz(hText, LEFT);
OBJSetColorGradient(hText, [255,0,0], [0,255,255]);
OBJSetFillMode(hText, 1);
OBJSetBkMode(hText, 0);
LayerSetAxisTB(hLayer, "X", hText);
TBDestroy(hText); // Delete copy otherwise we have a memory leek.
See also
id-1653779