合并富文本? [英] Merge Rich Text?

查看:39
本文介绍了合并富文本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个应用程序,它涉及逐个字符构建富文本,以便一次性撤消所有内容.为了保留该字符的格式,我选择了它,然后可以将 SelectedRtf 属性添加到我的 StringBuilder,但是我希望能够将每个富文本字符构建到一个富文本字符串中,以便我可以一次性撤消它.

I have an application which involves building rich text character by character in order to undo it all at once. In order to retain that character's formatting, I select it and then can add the SelectedRtf property to my StringBuilder, however I want to be able to build each Rich Text character into one Rich Text string so that I can undo it in one go.

我的问题是如何将富文本字符串组合成一个大字符串,同时保留每个字符的所有格式.

My question is how can you combine Rich Text strings into one big string while retaining all the formatting for each character.

推荐答案

以这种方式合并:

richTextBox2.Select(richTextBox2.TextLength, 0);
richTextBox2.SelectedRtf = richTextBox1.Rtf;

这篇关于合并富文本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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