Recent

Author Topic: Entering Page Breaks  (Read 3145 times)

rick2691

  • Sr. Member
  • ****
  • Posts: 444
Entering Page Breaks
« on: September 22, 2016, 02:19:10 pm »
I have found that my ViewPage (Print Preview) can work with Page Breaks that have been set by another editor. But I can't find a way to insert a Page Break by coding. Is there any method that is available?

Rick
Windows 11, LAZ 2.0.10, FPC 3.2.0, SVN 63526, i386-win32-win32/win64, using windows unit

rick2691

  • Sr. Member
  • ****
  • Posts: 444
Re: Entering Page Breaks
« Reply #1 on: September 22, 2016, 03:07:58 pm »
Never mind. I just figured it out...

Code: Pascal  [Select][+][-]
  1. procedure TCmdForm.MnuBreakClick(Sender: TObject);
  2. var SS: TStringStream;
  3. begin
  4.   SS:= TStringStream.Create('{\rtf1 {\page }}');
  5.   try PutRTFSelection(PageMemo, SS);
  6.       finally
  7.       SS.Free;
  8.       end;
  9. end;
  10.  

PutRTFSelection is the method posted in the thread titled:    
"Inserting, Saving and Loading Images"

Rick
Windows 11, LAZ 2.0.10, FPC 3.2.0, SVN 63526, i386-win32-win32/win64, using windows unit

 

TinyPortal © 2005-2018