Hi,
how to change the text of the page number?
In TRichViewEdit.
(example (1 ----> Page 1 of 3)
Thanks
Change Page number footer
-
- Posts: 16
- Joined: Tue Nov 10, 2009 7:27 pm
Re: Change Page number footer
AutoReply:haidomingo wrote:Hi,
how to change the text of the page number?
In TRichViewEdit.
(example (1 ----> Page 1 of 3)
Thanks
Code: Select all
procedure TScEditor.SEditorPaintPage(Sender: TObject; PageNo: Integer; PageRect,
R: TRect; Canvas: TCanvas);
var
H : Integer;
Text: String;
begin
Canvas.Brush.Style := bsSolid;
Canvas.Brush.Color := SEditor.RichViewEdit.Style.Color;
Canvas.Font.Assign(SEditor.RichViewEdit.Style.TextStyles[0]);
// Drawing footer
H := SEditor.BottomMargin100Pix;
Text := IntToStr(PageNo)+ ' di '+IntToStr(SEditor.PageCount);
Canvas.FillRect(
Rect(PageRect.Left, PageRect.Bottom - H, PageRect.Right, PageRect.Bottom));
Canvas.TextOut(
(PageRect.Left + PageRect.Right - Canvas.TextWidth(Text)) div 2,
PageRect.Bottom - H div 2, Text);
end;