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.AppendText(text);
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!