Different heading

General TRichView support forum. Please post your questions here
Post Reply
tiagosis
Posts: 19
Joined: Thu Apr 13, 2017 5:34 pm

Different heading

Post by tiagosis » Thu Apr 13, 2017 5:38 pm

Hello, how can I get different headers in the same document?
I'm using srichviewedit

Sergey Tkachenko
Site Admin
Posts: 14517
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Different heading

Post by Sergey Tkachenko » Thu Apr 13, 2017 6:48 pm

Different heading for different pages?
SRichViewEdit supports headers for the first page, odd and even pages.
If you want to enable them in user interface of RichViewActions, you can set checkboxes "special headers and footers for the first page" and "special headers and footers for odd and even pages".
If you want to enable them in code, assign True to SRV.PageProperty.TitlePage and SRV.PageProperty.FacingPages.

tiagosis
Posts: 19
Joined: Thu Apr 13, 2017 5:34 pm

Re: Different heading

Post by tiagosis » Mon Apr 17, 2017 1:13 pm

Thanks for replying, in fact what I need is to insert a variable where I can change its value in the header of each page, as if it were an accountant where I freely assign its contents. is this possible?

Sergey Tkachenko
Site Admin
Posts: 14517
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Different heading

Post by Sergey Tkachenko » Mon Apr 17, 2017 7:40 pm

Sorry, no. There are page number and page count fields, otherwise, headers are identical for all pages where they are displayed.

Sergey Tkachenko
Site Admin
Posts: 14517
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Different heading

Post by Sergey Tkachenko » Mon Apr 17, 2017 7:41 pm

You can draw your data on page in OnPaintPage event

tiagosis
Posts: 19
Joined: Thu Apr 13, 2017 5:34 pm

Re: Different heading

Post by tiagosis » Mon Apr 17, 2017 8:31 pm

Could you show me an example code of how to do this on the onpaintpage with the count in the header?

Sergey Tkachenko
Site Admin
Posts: 14517
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Different heading

Post by Sergey Tkachenko » Tue Apr 18, 2017 4:50 pm

You can see the demo in ScaleRichView\Demos\CustomDraw\Header and Footer folder.

Post Reply