Section Model Rich Text Box

Posted by: rgreen on 2 April 2021, 5:44 am EST

  • Posted 2 April 2021, 5:44 am EST

    In an older version of Active Reports we used Rich Text Boxes, and to edit specific text in the Rich Text Box we used properties such as SelectionStart, SelectionLength, and SelectionFont. However, with ActiveReports 15, it says this is obsolete. What is the updated way to edit text in a Rich Text Box?
  • Replied 4 April 2021, 3:47 pm EST

    Hello,

    Can you please share the use case so that I can help you to achieve the same.


    Thanks,
    Mohit
  • Replied 5 April 2021, 5:06 am EST

    Hello,

    There are certain keywords that we want to bold and highlight. Currently the code for this is:
         richTextBox.SelectionStart = startingPosition;
    richTextBox.SelectionLength = text.Length;
    richTextBox.SelectionFont = new System.Drawing.Font(richTextBox.Font, System.Drawing.FontStyle.Bold);
    richTextBox.SelectionBackColor = System.Drawing.Color.Yellow;


    However all these properties show as obsolete. What is the updated way to do this?
  • Replied 7 April 2021, 9:27 pm EST

    Hello,

    I have escalated the issue to the development team(AR-26365) and will update you once I get any information from them

    Thanks,
    Mohit
  • Replied 8 April 2021, 7:15 pm EST

    Hello,

    These properties still work with A15. You can use this to achieve your requirement.

    Thanks,
    Mohit
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels