October 13th, 2003, 12:10 PM
I am working on a HTML Text editor and I have a very important question, here it is. I have a RichTextBox and some buttons so far, when the user clicks on one of these buttons i want certain text to appear at the cursors position inside the RichTextBox(text should be inserted right beside the blinking cursor). I need to know an answer fast so any help you can give would be creatly appreciated.
October 13th, 2003, 08:22 PM
I have never played with rich text box and I'm not quite sure, but you can try:
where rtb is the RichTextBox and ins_str is the string that you want to insert to.
rtb.Text = rtb.Text.Insert(rtb.SelectionStart, ins_str);
October 14th, 2003, 04:21 AM