I have a text field on a form layout with scroll bars. The field has much text within it. I am stuck trying to figure out how from within a script to scroll the text to a specific cursor position from within a script.
I have in variables the cursor starting and selection size. The window is often scrolled to a position within the field such that the cursor position is not in view. How can I get the field view to scroll to a specified location?
I tried the Set Selection command. Technically it changes the selection to the specified coordinates, but the text being viewed just resets to the top of the field, with the selected portion not in view. A manual scroll down, the selected text is not highlited although internally it is.
I tried the Refresh Object. Does not scroll to the cursor position, just refreshes the data.
Entering the field by click on the scroll bar forces the cursor to the end of the field. Updating Selection using the saved values has no visual effect (although internally it is selected) and does not cause a scroll to the location.
So the question is how to get a text field to scroll to a specified cursor position from a script?