2 Replies Latest reply on Aug 16, 2012 8:52 AM by Sorbsbuster

    Holding scrolled field in place when having exited

    jebber6685

      Title

      Holding scrolled field in place when having exited

      Post

      I do a lot of copying between fields in some of my layouts. I often need to scroll down in a field using the scroll bar to find the right data to copy and paste into another field.

      When I exit the field to place curser in another field where I want to paste the data, the previous field where I copied the data from will automatically jump back to the top of the field data and not leave it alone where I copied the data from.

      This is irritating because I then must find that location again in order to extract more data for copying. 

      Is there a way that upon exiting the copy field, it will hold the data position even though I have scrolled down within the field using the scroll bar on right? Some sort of lock or hold position upon exit.


      Any help here would be greatly  appreciated.
      I have FMPro Advanced 12 v2
      OS - Windows Vista on desktop, Windows 7 on laptop

        • 1. Re: Holding scrolled field in place when having exited
          philmodjunk

          Not easily.

          You can experiment with script triggers and global variables to see if you can use a script to reset the cursor in the field and scroll the window.

          Get ( activeselectionStart) and Get ( activeSelectionSize ) can tell you what text is selected or the position of the cursor at the time you exit the field.

          Set Selection is a script step that can then use such numbers saved in global variables to reposition the cursor or reselect the same selected text and I think that should also scroll the selected text back in to view...

          • 2. Re: Holding scrolled field in place when having exited
            Sorbsbuster

            I created a field with a scroll bar and attached two scripts to it.  The first on exit captures the selection.  The second on entry goes to the captured selected text.  It selects the previously selected text perfectly.

            Unfortunately it doesn't scroll the text into view...