trichview.com

trichview.support




Re: more about header & footer ...


Return to index


Author

Message

Sergey Tkachenko

Posted: 03/15/2002 23:02:39


> Hi.

>

> The Header-and-Footer topic seems to be interesting for many programmers -

> for me too.

> (For me this is more important than bullets and numbering).

>

> Features like page number automation in headers/footers would be IMHO not

> really helpfull.

> At the moment we are *drawing* headers and footers by using the

> OnPagePrepaint event and TCanvas functions. It's a difficult work to

> calculate the correct zoom values for text an pictures (it's fun, but it

> takes a lot of time) and the appearance often is not 100% like the other

> RichView text. The advantage is, the flexibility. We can print out what

ever

> we want.


You need not to calculate a zoom of text.

Canvas parameter already has correct PixelsPerInch value, and you can use

normal Font.Sizes, such as 8,10,12..

Vertical zooming of pictures is Canvas.PixelsPerInch / Screen.PixelsPerInch


This event was not designed to draw complex header and footers, though.


>

> The new header/footer feature (in my dreams) consists of two parts:

>

> 1)

> A rectangle set (like a table with 1 column and 3 rows)

> - header rectangle

> - rich view area (already defined by the margin values)

> - footer rectangle


I think they will be implemented like in MS Word 2000.

I.e. richview area is defined by the margin values (as you said), and

distances from the top of page to header and from the bottom of page to

footer. Large header/footer can "press" the main area.


>

> 2)

> 2 new events (header/footer)

>

> OnGetHeader(TCustomRichView* headerRV, int pageNo)

> {

>     RV->AddText( "Page " + IntToStr(pageNo), ...);     ///... or whatever

> }

>

> (And it is nevertheless possible to use the OnPagePrepaint event.)


May be I'll add an option for generate header/footer for each page (and how

to save such things in RTF?), but in the main mode (I think) will be one

header template with some calculated fields. Probably options for odd/even

pages, first page, etc...





Powered by ABC Amber Outlook Express Converter