Hello all,
I have tried to use the following code to leftalign "some text" and rightalign "page 1 of 1" with tabstops - but the pagenumbering won't align to the right - what am I doing wrong?
Do you have any codesamples of the right way to do it?
Code
vWp := TWPRichText.CreateDynamic;
try
vWp.WorkOnText := wpIsHeader;
vWp.CurrAttr.ClearAllTabs;
vwp.CurrAttr.AddTab(vWp.Header.PageWidth - vWp.Header.RightMargin, tkRight);
vWp.InputString('Some text');
vWp.InputString(#9);
vWp.InputString('Page ');
vWp.InputTextField(wpoPageNumber);
vWp.InputString(' of ');
vWp.InputTextField(wpoNumPages);
vWp.InputString(CRLF);
vWp.Refresh;
vWp.ReformatAll;
vWp.WorkOnText := wpIsBody;
vWp.Print;
finally
FreeAndNil(vWp);
end;
Alles anzeigen
Thanks in advance
Michael Eriksen