TRVBoxPosition.HorizontalAnchor

<< Click to display table of contents >>

TRVBoxPosition.HorizontalAnchor

Specifies a horizontal anchor area for a floating box.

type
  TRVHorizontalAnchor = (rvhanCharacter, rvhanPage, rvhanMainTextArea,
    rvhanLeftMargin, rvhanRightMargin, rvhanInnerMargin, rvhanOuterMargin);
property HorizontalAnchor: TRVHorizontalAnchor;

A text box is positioned horizontally relative to the area specified in this property.

It is important to understand that each area has a width; for example, when printing using TRVPrint, a left margin starts from the page's left edge and ends at Margins.Left.

If RelativeToCell=True, and a sidenote (or a text box item) is inserted in a table cell, then this property defines an area of this cell instead of a page.

Value

Anchor Area

Scheme

rvhanCharacter

A sidenote character, or a place of insertion of a text box item.

Anchor_Character

rvhanPage

A whole page
(or a whole table cell)

Anchor_Page

rvhanMainTextArea

A main text area, i.e. an area between margins
(or a table cell area minus cellpadding)

Anchor_MainTextArea

rvhanLeftMargin

A left page margin
(or a left cell padding area)

Anchor_LeftMargin

rvhanRightMargin

A right page margin
(or a right cell padding area)

Anchor_RightMargin

rvhanInnerMargin

An inner page margin: a left margin for odd pages, a right margin for even pages
(or a left cell padding area on odd pages, a right cell padding area on even pages)

Anchor_RightMarginAnchor_LeftMargin

rvhanOuterMargin

An outer page margin: a right margin for odd pages, a left margin for even pages
(or a right cell padding area on odd pages, a left cell padding area on even pages)

Anchor_LeftMarginAnchor_RightMargin

Use TRichViewEdit.SetCurrentItemExtraIntPropertyEx and SetCurrentItemExtraStrPropertyEx to change value of this property as an editing operation.

Differences from Microsoft Word*:

In MS Word, a "character" anchor does not have a width, it is just a position. In TRichView, sidenote character has a width, so a center and a right alignments relative to a character of a sidenote are slightly different in TRichView and in MS Word (for simple text boxes, they are identical).

MS Word does not support a relative (percent) alignment relative to a character (so TRichView exports it as an absolute position with zero offset).

(* this information is based on test of MS Word 2013)

Default value:

rvhanCharacter