rvico TRichView Reference | TRichView | TRVRTFReaderProperties

TRVRTFReaderProperties.SetHeader

Top  Previous  Next

Specifies the document to read a page header in. Call with nil parameter to remove this link.

procedure SetHeader(RVData: TCustomRVData; HeaderType: TRVHFType=rvhftNormal);

Parameters:

RVData – document to read a page header (of the type specified in HFType) in;

HFType – header type (normal/for the first page/for even pages).

Example:

RichView1.Clear;

RichView2.Clear;

RichView1.RTFReadProperties.ReadDocParameters := True;

RichView1.RTFReadProperties.SetHeader(RichView2.RVData);

RichView1.LoadRTF('test.rtf');

RichView1.Format// contains document

RichView2.Format// contains header

RVPrint1.AssignSource(RichView1);

if RichView2.ItemCount>0 then

  RVPrint1.SetHeader(RichView2.RVData)

else
  RVPrint1.SetHeader(nil);

RVPrint1.AssignDocParameters(RichView1.DocParameters);

RVPrint1.FormatPages(rvdoAll);

RVPrint1.Print('Doc with header'1, False);

See also:

SetFooter.

See also properties of TRVStyle:

MainRVStyle.


TRichView © trichview.com