none
Insert text in the current cursor position in the RichTextBox control RRS feed

  • Question

  • Hi, I am creating an application in which I want to add some text in the richtextbox control after I click a button. But I want to add text in the current cursor position but not with the richTextBox1.AppendText("Some Text") or by richTextBox1.Text += "Some text"; . Any help would be much appreciated.
    Thursday, December 24, 2009 4:22 AM

Answers

  • try this

    richTextBox1.SelectedText =" Some Text ";

    hope this helped...



    Narayanan Dayalan - Zeetaa Business Solutions ------- Please "Mark As Answer", if my answer works well with ur Query
    • Proposed as answer by Noam B Thursday, December 24, 2009 11:40 AM
    • Marked as answer by Bin-ze Zhao Friday, December 25, 2009 8:38 AM
    • Unmarked as answer by HyperCoder Wednesday, December 30, 2009 3:55 AM
    • Marked as answer by HyperCoder Wednesday, December 30, 2009 3:56 AM
    Thursday, December 24, 2009 6:09 AM