我的 wpf 表单上有一个用户输入的丰富文本框,长度没有限制。但是,在我的活动报告输出中,每个页面上都有带有固定空间文本框的页面。有什么方法可以确定有多少富文本可以放入文本框中,将其写出来,然后继续在下一页上写其余的内容,直到我用完要写的文本?
1 回答
You can measure the length of plain text on an ActiveReports Page using the Page object's MeasureText method. See the following documentation: http://www.datadynamics.com/help/activereports6/ActiveReports.Document~DataDynamics.ActiveReports.Document.Page~MeasureText.html
If you have RTF output (I'm not sure if you do or not based on the information provided) it is probably not feasible to manually measure the text and break it up simply because RTF text is complex and breaking into parts is more difficult. However, the RichEdit/RTF control in ActiveReports should be able to paginate/page break it fine if you can let that control grow.