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
55
Different Behavior with UltraTextEditor
posted

I just upgraded an application from Infragistics 8.1 to 10.2.  The users are reporting that the behavior for UltraTextEditor is now different.  Before, the text contents were automatically selected when they tabbed into the field and they could just start typing over whatever was there.  Now, it seems that the cursor is positioned at the end of the text, forcing them to manually select and remove the old text before replacing with new text.

Did anything change?  What's the easiest way to get back to the behavior that the users have come to expect? 

I imagine that I could add an event handler for the UltraTextEditor's Enter event that would automatically select all text - I'm already doing something like this for UltraMaskedEdit - but that would involve touching every part of the application. 

 

 

Parents
No Data
Reply
  • 69832
    Suggested Answer
    Offline posted

    I vaguely remember a bug whereby we were not persisting the state of the SelectionStart/SelectionLength properties between edit mode sessions, which is wrong so we fixed it. This is consistent with the behavior of a standard TextBox; once the selection is changed by the user (say for example the caret is positioned before the second character), it reverts to that position the next time the control is focused.

    The solution for your problem is just what you mention - handling the Enter event and selecting all the text therein. To apply this behavior en masse to all UltraTextEditor controls, you could derive a class from UltraTextEditor, override the OnEnter method and change the selection in there, then change all references to this derived type.

Children