TextFrameGetInternalMargin

Description

Gets the distance (in twips) between a text frame's border line and the text. Twip is a fabricated word meaning twentieth of a point (pt).

Applies to

RichTextEdit control

Syntax

integer rtename.TextFrameGetInternalMargin(integer textFrameID, integer index)

Argument

Description

textFrameID

The unique ID that identifies the text frame.

index Specifies one of the four possible margins: 1 -- Left; 2 -- Top; 3 -- Right; 4 -- Bottom.

Return value

Integer.

Returns the distance between the text frame's border line and the text, in twips. For almost all units of measurement in the RichTextEdit control, twips are used. Twip is a fabricated word meaning twentieth of a point (pt).

Returns -1 if it fails. Returns null if any argument is null.

Examples

The following example gets the internal margins of the specified text frame.

integer li_frameid,li_rtnl,li_rtnt,li_rtnr,li_rtnb

li_frameid = rte_1.TextFrameInsertAsChar(-1,5000,1000)

//left margin
li_rtnl = rte_1.TextFrameGetInternalMargin(li_frameid,1)

//top margin
li_rtnt = rte_1.TextFrameGetInternalMargin(li_frameid,2)

//right margin
li_rtnr = rte_1.TextFrameGetInternalMargin(li_frameid,3)

//bottom margin
li_rtnb = rte_1.TextFrameGetInternalMargin(li_frameid,4)