3 Replies Latest reply on Jan 17, 2012 9:07 AM by philmodjunk

    How do you save and restore the current scroll position of the active record?

    gczychi

      Title

      How do you save and restore the current scroll position of the active record?

      Post

      Hi,

      I've looked at the «Scroll Window [Home/End/Page Up/Page Down/To Selection]», but this is not quite enough. There's the following situation:

      User looks at a list and a record is currently selected which is located in the middle of the window. Then, some scripts will run, the found set is changed but the previously selected record is still in the found set. Due to the scripts, another record is active, but no problem, I can go to the previous selected record.

      However, when I do this, the screen location of the active record is almost never the same as before. This is irritating for the user. If, say, the previously active record was right in the middle of the window, now it has moved someplace to the top or the bottom of the window.

      How can I change this, so that the active row is at the exact vertical window position as before?

      Thanks a lot for any hints!

      Gary

       

      FMP11Adv

        • 1. Re: How do you save and restore the current scroll position of the active record?
          philmodjunk

          I doubt that you can.

          When the script is run, is the resulting found set different from what was current before you ran it or does the found set change to accomplish some task and then change back to the original found set when done?

          If so, there's a way to avoid scrolling the window for that specific case.

          • 2. Re: How do you save and restore the current scroll position of the active record?
            gczychi

            Hi,

             

            the found set is not the same as before. Only the record that was active before is also available in the new found set and is active.  And that's so irritating, suddenly it is in a different line.  (I assume you would have suggested creating a new window and then closing it again :-)

            Is there no way to find out the current scrolling position or the position of the current line in the window or anything like that?  Maybe the screen coordinates of the mouse pointer?

            Thanks anyway,

            Gary

            • 3. Re: How do you save and restore the current scroll position of the active record?
              philmodjunk

              (I assume you would have suggested creating a new window and then closing it again :-)

              Actually, that method doesn't always work well in windows systems. I use a layout based on a different table occurrence of the same table to keep finds from affecting the current layout's found set. That avoids the need to mess around with a hidden window.

              Sorry, but I don't know of a way to do what you want.

              Depending on the changes made to your found set, it might not be possible even if you could detect the scroll position of the current record. There might not be enough records present between the current record and the start of the found set to keep the same position. Obviously, that might not be the case with your specific design and it'd be nice to be able to do this both with layouts and also portals, but I have yet to discover a way to do that.

              You are welcome to make a feature request in the Feature Suggestion Form.

              It'll feel a bit like writing a suggestion on a piece of paper and dropping it down a well, but it's the best I can offer you as this is the means FileMaker has set up for collecting and reviewing customer based feature requests.