VpeSetCharPlacement

<< Click to Display Table of Contents >>

Navigation:  Text Functions >

VpeSetCharPlacement

Previous pageReturn to chapter overviewNext page

[Professional Edition and above]

Allows to specify a constant offset from one character cell to another for text objects (not RTF). This is very useful for filling in forms that have pre-printed columns (cells) for each letter. The provided offset is understood as a "character cell width", VPE will print each character centered within this "cell".

void VpeSetCharPlacement(

VpeHandle hDoc,

VpeCoord distance

)

VpeHandle hDoc

Document Handle

VpeCoord distance

the distance from one character cell to the next

Default:

0 (no character placement)

Remarks:

When using CharPlacement, the TextAlignment must be either ALIGN_LEFT or ALIGN_RIGHT.

Example:

VpeSetCharPlacement(hDoc, 0.5)

VpePrint(hDoc, 1, 1, "123")

VPE will generate for each character in the given string internally a cell of 5 mm width. Each number of the string "123" will be printed centered within a cell. The first cell will be placed with the "1" at x-position 1.0 (1cm from the left paper margin), "2" at x-position 1.5 and "3" at x-position 2.0.