Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
640
Ultra text editor Focus
posted

Hi Everyone

I am using a number of TextEditor in my project and the text editors are filled with some values at the time of Initialization.

The problem is the datas are filled up perfectly in the text editor but when i make the focus on the Text Editor by hitting TAB the focus moves from one texteditor to another text editor but the cursor position is maintained at the last making the text editor look like that there is no value in that control. We can be able to see the value only when we hit HOME then the cursor moves to the first position.

 Is there any another way to make the focus on the control and also to maitain the cursor position in the first.

Please help me to solve this issue

 

Ferdin

Parents
  • 37774
    posted

     Ferdin,

    Is it also selecting the text by default when you tab into it?  You could try setting the SelectionLength property to control this:

     private void ultraTextEditor1_AfterEnterEditMode(object sender, EventArgs e)
    {
        UltraTextEditor textEditor = (UltraTextEditor)sender;
        textEditor.SelectionLength = 0;
    }

    There is also a SelectionStart property that controls where the cursor should be, so you could also experiment with that.

    -Matt

Reply Children