nLeftMargin, nTopMargin, nRightMargin, nBottomMargin

<< Click to Display Table of Contents >>

Navigation:  Layout Functions >

nLeftMargin, nTopMargin, nRightMargin, nBottomMargin

Previous pageReturn to chapter overviewNext page

Returns / sets the specific coordinate of the Page Margins.

Note: the values for margins are specified in coordinates relative to the top / left paper border, e.g. if the right margin shall be 2cm away from the right paper border, set it to ‘page_width - 2’. If you would set the right margin = 2, it would be 2cm away from the left border.

See "Dynamic Positioning" in the Programmer's Manual for details.

property VpeCoord VPE.nLeftMargin

property VpeCoord VPE.nTopMargin

property VpeCoord VPE.nRightMargin

property VpeCoord VPE.nBottomMargin

read / write; runtime only

Possible Values:

The coordinates of the Page Margins in metric or inch units.

Remarks:

For completeness, we list the values of the V-Flags here.

You should always use the named constants instead of the values.

Constant

Value

VLEFTMARGIN

-2147483552

VRIGHTMARGIN

-2147483553

VTOPMARGIN

-2147483556

VBOTTOMMARGIN

-2147483557

 

If you want to use the value of a margin directly, you may use the V-Flags VLEFTMARGIN, VTOPMARGIN, VRIGHTMARGIN, VBOTTOMMARGIN instead of using the above n-properties (in case you don't want to compute offsets).

Example: VPE.Write(VLEFTMARGIN, ...) and VPE.Write(VPE.nLeftMargin, ...) are identical, but the first version is a bit faster.

But if you want to use an offset, you must use the n-properties.

Example: VPE.Write(VPE.nLeftMargin + 0.5, ...) is correct, whilst VPE.Write(VLEFTMARGIN + 0.5, ...) is not possible.

 

For the .NET component we always recommend to use the n-Properties instead of the V-Flags.

 

See also:

SetOutRect