DrawTextBox Method

Word wraps the give text and print it into a given bounding rectangle. If the height of the rectangle is zero, then the rectangle stretches to accommodate to full text and the height of the rectangle is returned.


Object.DrawTextBox(tnLeft, tnTop, tnWidth, tnHeight, 
                   tcText [, tnAlign [, tnVAlign
                   [, tnRotate [,tnRotationPoint
                   [, tcLinkName [, tcLinkRef [, tcBookmark
                   [, tcTooltip [, tnmode [, liCP
                   [, tnOutlineStyle [, liOutlineR 
                   [, liOutlineG [, liOutlineB 
                   [, lcOutlineParent [, liInvisible
                   [, tnRotationXOffset [, tnRotationYOffset]]]]]]]]]]]]]]]]])

Return value

  The height of the bounding rectangle is returned.

Parameters

tnLeft, tnTop
  The X and Y coordinates of the upper left hand corner of the bounding rectangle.

tnWidth, tnHeight
  The width and the height of the bounding rectangle. If tnHeight is 0, the rectangle stretches to accommodate to full text and the height of the rectangle is returned.

tnAlign
  The horizontal alignment of the text inside of the rectangle. The allowed values are:

0  … “left”
1   …“center”
2  … “right”
3  … “block” (full justify)

Optional, the default value is 0 (left).

tnVAlign
  The vertical alignment of the text inside of the rectangle. The allowed values are:

0  … “top”
1   …“center”
2  … “bottom”.

Optional, the default value is 0 (top).

tnRotate
  The text rotation angle in degrees. The label will be rotated counterclockwise. Optional, default value = 0.

tnRotationPoint

   The point within the rectangle around which the text is rotated. The allowed values are 0..8, optional, default value = 0 (left, top). Please see the picture on the right for the point positions.

tcLinkName
  If this parameter is filled, the text will be a named target of a hyperlink. (see tcLinkRef parameter).

tcLinkRef
  If this parameter is filled, the text will be a hyperlink. It will navigate to a target with tcLinkRef name.

tcBookmark
  If not empty, the parameter contains a name of a bookmark that will be created and will navigate to this text.

tcTooltip
  The tooltip displayed when hovering mouse over this text.

tnMode
   Opaque/transparent mode (since XFRX 15.4).
0  … “opaque
1   …“transparent”

liCP
  Code page of text (since XFRX 15.7)

tnOutlineStyle
  Outline style (since XFRX 19.0)
  0  ... normal
  1  ... italic
  2  ... bold
  3  ... bold+italic

liOutlineR, liOutlineG, liOutlineB
  Red, green and blue components of the outline foreground color (since XFRX 19.0)

lcOutlineParent
  If not empty, the parameter contains a parent name of a bookmark/outline. (since XFRX 19.0)

liInvisible
 Invisible flag (since XFRX 21.0).

tnRotationXOffset
 Rotation X Offset in foxels from the left top corner. (since XFRX 21.1)

tnRotationYOffset
 Rotation Y Offset in foxels from the left top corner.  (since XFRX 21.1)

Remarks

Applies To: XFRX#DRAW, XFRX#XML