Page 1 of 1

InsertPageBreak

Posted: Mon Nov 10, 2008 5:38 pm
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...

Posted: Tue Nov 11, 2008 1:42 pm
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?