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

Click-to-edit-Textbox

3 Answers 30 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Tim
Top achievements
Rank 1
Tim asked on 18 Nov 2011, 11:15 AM
Hello there!

I need a simple "Click-to-edit"-Textbox. (like the EditMode from a TreeView, for example) Is there some support from Telerik? Do I have to use the "protection" featurre of the richtextbox? I guess that this would be a little overhead... Can the MaskedTextBox be used?

Thanks a lot for any information on this topic!
All the best,
Tim.

3 Answers, 1 is accepted

Sort by
0
Vesko
Telerik team
answered on 23 Nov 2011, 10:59 AM
Hi Tim,

Thanks for your question!
If you want to enable/disable the editing in the RadRichTextBox, you can simply use the IsReadOnly property.

Greetings,
Vesko
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
Tim
Top achievements
Rank 1
answered on 24 Nov 2011, 08:18 AM
Hello Vesko,

thanks for your answer! Currently I am using a textbox and the IsReadOnly property but how can one simulate a tab key or how can one remove the focus when the users presses 'Return' as this is the moment where databinding should occur!
 
Thanks a lot and all the best,
Tim.
0
Boby
Telerik team
answered on 28 Nov 2011, 06:12 PM
Hi Tim,
You can use RadRichTextBox.PreveiewEditorKeyDown event and move the focus to the next control:
private void radRichTextBox_PreviewEditorKeyDown(object sender, Telerik.Windows.Documents.PreviewEditorKeyEventArgs e)
{
    if (e.Key == Key.Enter)
    {
        this.nextControl.Focus();
    }
}

Don't hesitate to contact us if you have other questions.

Kind regards,
Boby
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
RichTextBox
Asked by
Tim
Top achievements
Rank 1
Answers by
Vesko
Telerik team
Tim
Top achievements
Rank 1
Boby
Telerik team
Share this question
or