本帖最后由 gw0506 于 2016-6-7 18:39 编辑
是我不好意思才对,PageCollection的确没有暴露Add方法。有一个做法如下:- 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();
复制代码 这个新加入的page的页码不就是 Count吗?我理解的对吗? 如果是,那就是 this.textControl1.Pages
|