分页符插入,实际上就是要新插入一个页面吧
- textControl1.ViewMode = TXTextControl.ViewMode.PageView;
- int newPage = this.textControl1.InputPosition.Page + 1;
- InputPosition inputPosition = new TXTextControl.InputPosition(newPage, 1, 0);
- this.textControl1.Selection.Text = "\f";
- this.textControl1.InputPosition = inputPosition;
- Point ScrollPosition = new Point(0, inputPosition.Location.Y);
- this.textControl1.ScrollLocation = ScrollPosition;
- this.textControl1.Focus();
复制代码
分节符插入,SectionBreakKind有两个选项可选,分别是在新一行或者新一页,因此这个方法就可以同时也插入新一页
- _textControl.Sections.Add(SectionBreakKind.BeginAtNewLine);
复制代码 |