RTF 内容合并 (刚做完技术支持,查了一下资料记录一下)

给个同事做了一下支持:关于RichTextBox中的内容合并,尝试了好几总办法:什么去文件头、文件尾等等均未成功。后来找到一段代码改造了一下,解决问题,如下:

 1 None.gif public   void  RTFMerge()
 2 ExpandedBlockStart.gifContractedBlock.gif dot.gif {
 3InBlock.gif            richTextBox1.SelectionStart = 0;
 4InBlock.gif            richTextBox1.SelectionLength = richTextBox1.Text.Length;
 5InBlock.gif
 6InBlock.gif            richTextBox2.SelectionStart = 0;
 7InBlock.gif            richTextBox2.SelectionLength = richTextBox2.Text.Length;
 8InBlock.gif
 9InBlock.gif
10InBlock.gif            richTextBox3.SelectionStart = 0;
11InBlock.gif            richTextBox3.SelectionLength = richTextBox3.Text.Length;
12InBlock.gif
13InBlock.gif            richTextBox3.SelectedRtf = richTextBox1.SelectedRtf;
14InBlock.gif            richTextBox3.SelectionStart = richTextBox3.Text.Length;
15InBlock.gif            richTextBox3.SelectionLength = 0;
16InBlock.gif            richTextBox3.SelectedText = "\n";
17InBlock.gif            richTextBox3.SelectionStart = richTextBox3.Text.Length;
18InBlock.gif            richTextBox3.SelectionLength = 0;
19InBlock.gif            richTextBox3.SelectedRtf = richTextBox2.SelectedRtf;
20InBlock.gif
21InBlock.gif
22InBlock.gif            richTextBox1.SelectionStart = 0;
23InBlock.gif            richTextBox1.SelectionLength = 0;
24InBlock.gif            richTextBox2.SelectionStart = 0;
25InBlock.gif            richTextBox2.SelectionLength = 0;
26ExpandedBlockEnd.gif}

27 None.gif

转载于:https://www.cnblogs.com/spymaster/archive/2007/02/14/650383.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值