int previousSelectedIndex = this.rtb.SelectionStart;
int selectedLengthText = this.rtb.SelectionLength; setcolor(color) //--- My own method to set color to the text based on certain conditionthis.rtb.AppendText("Hi i am appending text");
this.rtb.AppendText("\n");
this.rtb.SelectionStart = previousSelectedIndex;
this.rtb.SelectionLength = selectedLengthText; rtb.Focus();Please help me in fixing this issue.Regards
rtb.Focus();Please help me in fixing this issue.Regards