trichview.com

trichview.support




Re: Inserting page # in footer


Return to index


Author

Message

David Kroll

Posted: 10/16/2003 19:04:30


Is there a way that I can put it in a table cell that I have in my footer

RichView?


"Stef Mientki" <[email protected]> wrote in message

news:[email protected]...

> from one of the examples:

> succes,

> Stef Mientki

>

> procedure TfrmPreview.RVPrint1PagePrepaint(Sender: TRVPrint;

>    PageNo: Integer; Canvas: TCanvas; Preview: Boolean; PageRect,

>    PrintAreaRect: TRect);

>

(***************************************************************************

****

>

****************************************************************************

***)

> var w,h: Integer;

>      s: String;

> begin

>    // This is a temporary solution for drawing page numbers and

> similalar stuff

>    // This example outputs string just above RichView contents

>    s := Format ('-- Page %d of %d --', [PageNo, Sender.PagesCount]);

>    Canvas.Brush.Style := bsClear;

>    Canvas.Font.Assign(form1.RVStyle1.TextStyles[0]);

>    w := Canvas.TextWidth(s);

>    h := Canvas.TextHeight(s);

>    TextOut(Canvas.Handle, (PrintAreaRect.Right+PrintAreaRect.Left-w) div

>                2,PrintAreaRect.Top - h - 10, PChar(s), Length(s));

> end;

>

>

>

> David Kroll wrote:

> > How would I put the page # in the footer, i.e. Page 1 of 2.

> >

> > Thanks,

> >

> > David

> >

> >

>





Powered by ABC Amber Outlook Express Converter