InsertPageBreak

General TRichView support forum. Please post your questions here
Post Reply
Nicklas
Posts: 16
Joined: Mon Nov 10, 2008 2:17 pm

InsertPageBreak

Post by Nicklas »

I'm having trouble using the TRichViewEdit.InsertPageBreak procedure...
- It doesn't add anything to the page so that all lines come out on the same page :cry:

... I can use ".PageBreaksBeforeItems[PreviewEdit.ItemCount-1] := True", but that does not always work since tables for instance make the pagebreak come before the table and not after...
- I believe I should use the .InsertPageBreak procedure, but I can't make it do anything...
Sergey Tkachenko
Site Admin
Posts: 17531
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

InsertPageBreaks does the following:
1) If the caret is not at the beginning of a paragraph, adds a line break (in the next update, line break will also be added when the caret is at the beginning of a document).
2) Sets PageBreaksBeforeItems = True for the item at the position of the caret, in undoable way.

Please give me a step-by-step instructions how to reproduce the problem with InsertPageBreak. In my tests, it works as expected. Where I need to place the caret so that InsertPageBreak will do nothing?
Post Reply