Richtextbox具有更多功能. [英] Richtextbox to have more features.

查看:65
本文介绍了Richtextbox具有更多功能.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,我当前的文字处理应用程序出现了问题.问题是,它使用标准的RichTextBox,并且如果您打印某些内容,它将变得很奇怪.

我想要的方式就像是MS Word,LibreOffice等中的虚拟页面一样.有可能吗?

So, I have a problem with my current word processing app. The problem is, it uses a standard RichTextBox and if you print something, it will just get all weird.

The way I want it to be, is like a virtual page like in MS Word, LibreOffice, etc. Is it possible?
Another thing, is there a way to add shapes?

推荐答案

对于打印-和打印预览(在不同上下文中是相同的事情),请使用PrintDocument类.它使您可以完全控制打印输出,并自动提供预览.

如果由于用户使用空格而不是制表符而使格式化使它变得很奇怪",那么您需要将打印的空间映射为与显示RTB的空间相同,或者手动将其替换为适当的空间标签,换行符等.
For printing - and print preview, which is the same thing on a different context - use the PrintDocument class. It allows you full control over the printed output, as well as providing previews automatically.

If formatting makes it "all weird" because the user has used spaces instead of tabs, then you need to either map the space you print onto to be the same as the space you display the RTB on, or manually replace the spaces with the appropriate tabs, newlines, etc.


这篇关于Richtextbox具有更多功能.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆