The following code outputs the same text 3 ways, all of which should appear as a single line:
1. This right aligned text fully abuts the right side of the A4 page as expected.
2. This left aligned version with R = VFREE writes OK as well.
3. This is the same left aligned version pushed a little further right - and it now wraps to a second line. Clearly, it should actually fit on a second line...
- Code: Select all
with VPEngine1 do
begin
GridMode := InBackground;
GridVisible := True;
OpenDoc;
SetFont('Arial', 10);
//1: this aligns the text with the right page edge without wrapping
TextAlignment := ALIGN_RIGHT;
Write(17, 2, 21, 3, 'Some Sample Text');
//2: this should fit without wrapping
TextAlignment := ALIGN_LEFT;
Write(16, 3, VFREE, 4, 'Some Sample Text');
//3: this should fit without wrapping
TextAlignment := ALIGN_LEFT;
Write(17, 4, VFREE, 5, 'Some Sample Text');
Preview;
end;