FormatFrame

Syntax

FormatFrame [.Wrap = number] [, .WidthRule = number] [, .FixedWidth = number or text] [, .HeightRule = number] [, .FixedHeight = number or text] [, .PositionHorz = number or text] [, .PositionHorzRel = number] [, .DistFromText = number or text] [, .PositionVert = number or text] [, .PositionVertRel = number] [, .DistVertFromText = number or text] [, .MoveWithText = number] [, .LockAnchor = number] [, .RemoveFrame]

Remarks

Positions and sets options for the selected frame. If the insertion point or selection is not within a frame, an error occurs. The arguments for the FormatFrame statement correspond to the options in the Frame dialog box (Format menu).

Argument

Explanation

.Wrap

Specifies a Text Wrapping option:

0 (zero) Text does not wrap around the frame.

1 Text wraps around the frame.

.WidthRule

The rule used to determine the width of the frame:

0 (zero) Auto (determined by paragraph width).

1 Exactly (width will be exactly .FixedWidth).

.FixedWidth

If .WidthRule is 1, the width of the frame in points or a text measurement.

.HeightRule

The rule used to determine the height of the frame:

0 (zero) Auto (determined by paragraph height).

1 At Least (height will be no less than .FixedHeight).

2 Exactly (height will be exactly .FixedHeight).

.FixedHeight

If .HeightRule is 1 or 2, the height of the frame in points or a text measurement (72 points = 1 inch).

.PositionHorz

Horizontal distance, in points or a text measurement, from the edge of the item specified by .PositionHorzRel. You can also specify "Left," "Right," "Center," "Inside," and "Outside" as text arguments.


Argument

Explanation

.PositionHorzRel

Specifies that the horizontal position is relative to:

0 (zero) Margin

1 Page

2 Column

.DistFromText

Distance between the frame and the text to its left, right, or both, in points or a text measurement.

.PositionVert

Vertical distance, in points or a text measurement, from the edge of the item specified by .PositionVertRel. You can also specify "Top," "Bottom," and "Center" as text arguments.

.PositionVertRel

Specifies that the vertical position is relative to:

0 (zero) Margin

1 Page

2 Paragraph

.DistVertFromText

Distance between the frame and the text above, below, or both,
in points or a text measurement.

.MoveWithText

If 1, the frame moves as text is added or removed around it.

.LockAnchor

If 1, the frame anchor (which indicates where the frame will appear in normal view) remains fixed when the associated frame
is repositioned. A locked frame anchor cannot be repositioned.

.RemoveFrame

Removes the frame format from the selected text or graphic.


Example

This example selects and frames the current paragraph and then formats the frame as left-aligned, relative to the current column, with a 0.13-inch gap between the frame and text above and below:


EditGoTo "\Para"
InsertFrame
FormatFrame .PositionHorz = 0, .PositionHorzRel = 2, \
    .DistVertFromText = "0.13 in"

See Also

EditFindFrame, EditReplaceFrame, FormatDefineStyleFrame, InsertFrame, RemoveFrames