Completed
Last Updated: 18 Nov 2014 09:40 by ADMIN
ADMIN
Dess | Tech Support Engineer, Principal
Created on: 13 Nov 2014 16:23
Category: Editors
Type: Bug Report
0
FIX. RadTextBoxControl - Incorrect caret position after clearing the text
To reproduce: add a RadTextBoxControl and use the following code snippet:

private void radTextBoxControl1_KeyPress(object sender, KeyPressEventArgs e)
{
    if (e.KeyChar == 13)
    {
        radTextBoxControl1.Clear();
    }
}

When you enter some text and hit Enter, the text is cleared, but the caret position remains the same.

Workaround: 

private void radTextBoxControl1_KeyPress(object sender, KeyPressEventArgs e)
{
    if (e.KeyChar == 13)
    {
        radTextBoxControl1.Clear();
        radTextBoxControl1.CaretIndex = 0;
    }
}

0 comments