Description
Inserts a new text frame anchored to a paragraph. The text flows around the text frame.
Applies to
Syntax
integer rtename.TextFrameInsert(long textPos, integer alignment, long posX, long posY, integer width, integer height, integer textFlow, integer distanceL, integer distanceT, integer distanceR, integer distanceB)
Argument |
Description |
---|---|
textPos |
Specifies a text position in the paragraph where to insert the text frame. If TextPos is -1, the text frame is anchored to the paragraph at the current input position. |
alignment |
Specifies the text frame's horizontal alignment. It can be one of the following values:
|
posX | The text frame's horizontal position in twips relative to the left border of the paragraph. This value is used if the Alignment parameter has been set to 0. Twip is a fabricated word meaning twentieth of a point (pt). |
posY | The text frame's vertical position in twips relative to the top border of the paragraph. Twip is a fabricated word meaning twentieth of a point (pt). |
width | The width of the text frame in twips. If this parameter is set to zero, a built-in mouse interface is started which enables the end-user to define the size of the text frame through a rectangle, drawn with the mouse. Twip is a fabricated word meaning twentieth of a point (pt). |
height | The height of the text frame in twips. If this parameter is set to zero, a built-in mouse interface is started which enables the end-user to define the size of the text frame through a rectangle, drawn with the mouse. Twip is a fabricated word meaning twentieth of a point (pt). |
textFlow |
Specifies how text flows around the text frame. Values are:
|
distanceL | Specifies the left distances, in twips, between the text frame and the document's text. Twip is a fabricated word meaning twentieth of a point (pt). |
distanceT | Specifies the top distances, in twips, between the text frame and the document's text. Twip is a fabricated word meaning twentieth of a point (pt). |
distanceR | Specifies the right distances, in twips, between the text frame and the document's text. Twip is a fabricated word meaning twentieth of a point (pt). |
distanceB | Specifies the bottom distances, in twips, between the text frame and the document's text. Twip is a fabricated word meaning twentieth of a point (pt). |
Return value
Integer.
Returns the unique ID that identifies the newly-inserted text frame. Returns 0 if it fails. Returns null if any argument is null.
Examples
The following example inserts text frames at various positions.
integer li_rtn //The text frame is centered relative to the paragraph li_rtn = rte_1.TextFrameInsert(-1,3,0,1000,5000,100,2,0,0,0,0) //Specifies the text frame's horizontal position by PosX li_rtn = rte_1.TextFrameInsert(-1,0,100,2000,5000,100,2,0,0,0,0) //The text flows around the text frame li_rtn = rte_1.TextFrameInsert(-1,0,100,3000,5000,100,3,0,0,0,0)