zoukankan      html  css  js  c++  java
  • RTF 内容合并 (刚做完技术支持,查了一下资料记录一下)

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

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

    27

  • 相关阅读:
    RM报表 实际打印的判断
    ehlib 如何用代码,选中checkbox呢?
    [CF632A]Grandma Laura and Apples
    [洛谷P3693]琪露诺的冰雪小屋
    [CF1065A]Vasya and Chocolate
    [UOJ #52]【UR #4】元旦激光炮
    [UOJ #48]【UR #3】核聚变反应强度
    [UOJ #51]【UR #4】元旦三侠的游戏
    [洛谷P1401]城市
    [洛谷P4722]【模板】最大流 加强版 / 预流推进
  • 原文地址:https://www.cnblogs.com/spymaster/p/650383.html
Copyright © 2011-2022 走看看