<< Click to Display Table of Contents >> Advanced Dynamic Positioning |
Imagine, you created a report. Later you want to change the width of one field in a table. Would you really want to edit all coordinates of all other fields next to it?
What, if you want to place an object relative to another, but with a gap between them?
You can retrieve and set all coordinates with the functions VpeGet and VpeSet.
Instead of the DLL functions VpeGet and VpeSet, the ActiveX, VCL and .NET Controls offer you the following n-Properties:
nLeft, nTop, nRight, nBottom, nWidth, nHeight
nLeftMargin, nTopMargin, nRightMargin, nBottomMargin
They relate to the V-Flags, but you can directly use them for offset computations.
They make the use of Dynamic Positioning much more easy and transparent.
The .NET and Java controls offer one additional n-Property: nFree, which is equal to VFREE
Examples:
DLL:
VpeWrite(hDoc, VLEFT, VpeGet(hDoc, VBOTTOM) + 1, VRIGHT, VFREE, "text3");
ActiveX / VCL:
Doc.Write(VLEFT, Doc.nBottom + 1, VRIGHT, VFREE, "text3");
.NET:
Doc.Write(Doc.nLeft, Doc.nBottom + 1, Doc.nRight, Doc.nFree, "text3");
Java:
Doc.Write(Doc.getNLeft(), Doc.getNBottom() + 1, Doc.nRight, Doc.nFree, "text3");
Inserts the next text object 1cm below the bottom border of the last inserted object. The left coordinate and the width of the newly inserted text will be exactly the same of the previously inserted object, the height of the new text will be computed by VPE.