This is a migrated thread and some comments may be shown as answers.

Remove RadRichTextBox Cursor

2 Answers 80 Views
RichTextBox (obsolete as of Q3 2014 SP1)
This is a migrated thread and some comments may be shown as answers.
Kevin
Top achievements
Rank 1
Kevin asked on 24 Oct 2011, 09:35 PM

Hi

I'm trying to use a telerik RadRichTextBox for my windows form.  Is there a way I can remove the cursor from the control after inserting the value using the following line:

    RADRichTextBox1.Insert('xxx')

    RADRichTextBox2.Insert('yyyy')

Please see the attachment for reference. 


2 Answers, 1 is accepted

Sort by
0
Kevin
Top achievements
Rank 1
answered on 26 Oct 2011, 05:58 AM
Can anyone please help me on this?

Thank you.
0
Svett
Telerik team
answered on 26 Oct 2011, 01:31 PM
Hi Steve,

I managed to reproduce the issue. It will be addressed in the upcoming release. In the meantime, you can create a custom caret to work around the issue:

public class MyCaret : RadCaret, IEditorCaret
{
    private DocumentView documentView;
 
    public MyCaret(DocumentView documentView)
        : base(documentView)
    {
        this.documentView = documentView;
    }
 
    void IEditorCaret.Show()
    {
        if (this.documentView.IsFocused)
        {
            this.Show();
        }
    }
}

this.radRichTextBox1.DocumentView.Caret = new MyCaret(this.radRichTextBox1.DocumentView);
this.radRichTextBox2.DocumentView.Caret = new MyCaret(this.radRichTextBox2.DocumentView);

I updated your Telerik points.

All the best,
Svett
the Telerik team

Q2’11 SP1 of RadControls for WinForms is available for download (see what's new); also available is the Q3'11 Roadmap for Telerik Windows Forms controls.

Tags
RichTextBox (obsolete as of Q3 2014 SP1)
Asked by
Kevin
Top achievements
Rank 1
Answers by
Kevin
Top achievements
Rank 1
Svett
Telerik team
Share this question
or