Merge Rich Text?

冷暖自知 提交于 2020-01-05 10:16:32

问题


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.


回答1:


merge it this way:

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


来源:https://stackoverflow.com/questions/4254229/merge-rich-text

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!