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
125
UltraTextEditor Character Position within text
posted

I am trapping the right-click event on the editor of an UltraTextboxEditor.  I would like to be able to determine the character position in the text where it occurs similar to the Microsoft textbox control method 'GetPositionFromCharIndex'.  Is this stored anywhere or can it be derived through code?

Parents
No Data
Reply
  • 22852
    Verified Answer
    Offline posted

    Vic,

    If the editor is in edit mode (as it will be if you handle the MouseUp event), you can access the TextBox that is used internally and call GetPositionFromCharIndex on that TextBox:

    Me.UltraTextEditor1.Editor, EditorWithText).TextBox.GetPositionFromCharIndex(3)

    I am curious why you don't just use the coordinates from the mouse event and get them from the textbox based on text location.

    Let me know if you have any questions with this matter.

    Me.UltraTextEditor1.Editor, EditorWithText).TextBox.GetPositionFromCharIndex(3)

Children