Rich Text Box line and text color issues RRS feed

  • Question

  • so i had a little snippet of code whipped up that used to work before i changed my code during a redesign, basically it allowed me to call

    for a chat bot

    any of my questions would be called this way to the RTB

     richTextBoxEx1.AppendTextEX(textm, Color.White, Color.FromArgb(14, 33, 48));

    and the bots
    richTextBoxEx1.AppendTextEX(e.Text + " ", Color.Cyan, Color.FromArgb(36, 106, 127));

    respectively i am using dev components but both the windows RTB and dev RTB are basically identical

    public static void AppendTextEX(this DevComponents.DotNetBar.Controls.RichTextBoxEx box, string text, Color color, Color color2)
                box.SelectionStart = box.TextLength;
                box.SelectionLength = 0;

                box.SelectionColor = color;
                box.SelectionBackColor = color2;
                box.SelectionColor = box.ForeColor;

    the problem now comes when i call this
     richTextBoxEx1.Text = richTextBoxEx1.Text.Remove(index);

    with index being the start of the current line, sadly it has to be this way as it is pulling the users input from an external source of text from a speech recognition program.

    is there any way i can remove the current entered text back to the index integer i have given the remove command without ruining the coloring of the richtextbox?

    thanks guys!

    • Moved by Kristin Xie Monday, September 8, 2014 7:45 AM
    Sunday, September 7, 2014 11:27 AM

All replies

  • Hi James,

    >>respectively i am using dev components but both the windows RTB and dev RTB are basically identical

    For dev components is a third-party componets, i am afarid this is out of our support. I would suggest you ask there official foum for better support. Here is the link.


    Best regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, September 8, 2014 7:44 AM
  • it doesnt matter, they are exactly the same, just consider it the same as the windows rich text box as i used the exact same code on my previous version which used the windows rich text box before changing it to the dev components rich textbox as it looked more appealing for my application
    Monday, September 8, 2014 10:36 AM