Procedure SetTextWidth Sets the text wrapping margin width of the referenced text object.
A call to SetTextWidth automatically activates text wrapping.
PROCEDURE SetTextWidth(
theText : HANDLE;
widthDistance : REAL);def vs.SetTextWidth(theText, widthDistance):
return None| Name | Type | Description |
|---|---|---|
| theText | HANDLE | Handle to text object. |
| widthDistance | REAL | Text wrapping margin setting for text. |
PROCEDURE Example;
FUNCTION IncreaseTextWidth(h :HANDLE) :BOOLEAN;
BEGIN
SetTextWidth(h, GetTextWidth(h) * 1.2);
END;
BEGIN
ForEachObjectInLayer(IncreaseTextWidth, 2, 0, 4);
END;
RUN(Example); CreateText(pText);
SetTextVerticalAlign(LNewObj, 3);
SetTextJust(LNewObj, 2);
GetContainerInfo(objHand, containerHandle, containerType, containerScale);
SetTextWidth(LNewObj, pText_Width * containerScale);
END;
TextOrigin(0, textCenterY * Scale);
CreateText(pText);
h := LNewObj;
SetTextJust(h, 2);
SetTextWidth(h, TextBoxWidth * Scale);
SetTextVerticalAlign(h, 3);
SetFPat(h, 0);
END;
CreateText(strBelow);
h2 := LNewObj;
SetFPat(h1,0);
SetFPat(h2,0);
SetTextWidth(h2,(gScaleFactor*wid));vs.SetTextWidth('Example', 1.0)VS Functions: GetTextWidth
Availability: from VectorWorks8.0