rvico TRichView Reference | Item Types | Sidenote | BoxPosition

TRVBoxProperties.HorizontalPositionKind, HorizontalOffset, HorizontalAlignment

Top  Previous  Next

These properties define a horizontal position of a floating box.

type
  TRVFloatHorizontalAlignment = (rvfphalLeft, rvfphalCenter, rvfphalRight);
property HorizontalPositionKind: TRVFloatPositionKind;
property HorizontalOffset: TRVFloatPosition;
property HorizontalAlignment: TRVFloatHorizontalAlignment;

A position is calculated relative to the area specified in HorizontalAnchor.

Note 1: these properties define the position of the box in the way similar to Microsoft Word. However, there are differences, see the notes in the topic about HorizontalAnchor.

Note 2: printers cannot print at areas close to paper edges; is the box is positioned close to a left or a right side of the page, it may overlap these areas.

HorizontalPositionKind=rvfpkAlignment

The position is defined in HorizontalAlignment. HorizontalOffset is ignored.

Value of HorizontalAlignment

Meaning

Scheme

rvfphalLeft

The left side of the box is at the left side of the anchor area.

Pos0Prc

rvfphalCenter

The center of the box is at center of the anchor area.

PosCenter

rvfphalRight

The right side of the box is at the right side of the anchor area.

PosRight

HorizontalPositionKind=rvfpkAbsPosition

The position is defined in HorizontalOffset. HorizontalAlignment is ignored.

HorizontalOffset is measured in pixels or twips, depending on Units property of the linked TRVStyle.

A position is counted from the left side of the anchor area. Positive values shift the box to the right, negative values shift the box to the left.

HorizontalPositionKind=rvfpkPercentPosition

The position is defined in HorizontalOffset. HorizontalAlignment is ignored.

HorizontalOffset is measured in (1/1000)% of the anchor area width.

A position is counted from the left side of the anchor area. Positive values shift the box to the right, negative values shift the box to the left.

Examples:

Value of HorizontalOffset

Meaning

Scheme

0

0%

Pos0Prc

100000

100%

Pos100Prc

50000

50%

Pos50Prc

-100000

-100%

Pos-100Prc

 

Use TRichViewEdit.SetCurrentItemExtraIntPropertyEx and SetCurrentItemExtraStrPropertyEx to change values of these properties as an editing operation.

Default values:

HorizontalPositionKind: rvfpkAbsPosition

HorizontalOffset: 0

HorizontalAlignment: rvfphalLeft


TRichView © trichview.com