nLeft, nTop, nRight, nBottom

<< Click to Display Table of Contents >>

Navigation:  Layout Functions >

nLeft, nTop, nRight, nBottom

Previous pageReturn to chapter overviewNext page

Returns / sets the specific coordinate of the last inserted object. Setting these properties is also possible. You may also use the V-Flags VLEFT, VTOP, VRIGHT, VBOTTOM, if you don't want to compute offsets.  For the .NET component we always recommend to use the n-Properties instead of the V-Flags.

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

property VpeCoord VPE.nLeft

property VpeCoord VPE.nTop

property VpeCoord VPE.nRight

property VpeCoord VPE.nBottom

read / write; runtime only

Possible Values:

The coordinates of the last inserted object.

Example:

Doc.Write(1, 2, 4, 3, "Hello")

After executing this method the properties contain the following values:

nLeft = 1, nTop = 2, nRight = 4, nBottom = 3

 

You can insert an object at the right border of the last inserted object with:

Doc.Print(Doc.nRight, Doc.nTop, " World!")

 

 

The equal result (but with faster processing) is created with the following statement:

 

ActiveX / VCL:

Doc.Print(VRIGHT, VTOP, " World!")

 

.NET:

Doc.Print(VpeControl.VRIGHT, VpeControl.VTOP, " World!")

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

 

If you want to insert the second object with an offset, you can only use:

Doc.Print(Doc.nRight + 0.5, Doc.nTop, " World!")

which will insert the object with an offset of 0.5 cm to the right border of the previously inserted object.

 

The following is not possible:

Doc.Print(VRIGHT + 0.5, VTOP, " World!")

because VRIGHT is a constant (its value is -2147483551) which instructs VPE to retrieve the value of the property nRight internally. If you add 0.5, the result is -2147483550.5, which is interpreted as a standard coordinate.

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

VLEFT

-2147483550

VRIGHT

-2147483551

VTOP

-2147483554

VBOTTOM

-2147483555