Use strings in WPTOOLS format with the <newsection/> tag

<< Click to Display Table of Contents >>

Navigation:  Programming > Sections >

Use strings in WPTOOLS format with the <newsection/> tag

This technique allows it to create a multi section text by simply appending strings or streams without loading the text into an editor. This shows how versatile the WPTOOLS format can be used:

 

procedure TWPALL.AppendWithStringsClick(Sender: TObject);

begin

 WPAll.AsString := '<newsection/>' + WP1.AsANSIString('WPTOOLS')

  +'<newsection/>' + WP2.AsANSIString('WPTOOLS')

  +'<newsection/>' + WP3.AsANSIString('WPTOOLS');

// Using <newsection pagebreak=0/> no page break will be inserted

end;