1 Reply Latest reply on Nov 13, 2016 12:54 PM by philmodjunk

    Scroll Window script step bug(?)

    RichardStuart_2

      (I don't want to file this as a bug until someone else checks it out to confirm that it's not just me being ignorant.)

       

      I coded a simple Unsort script written thus:

       

      Unsort Records

      Scroll Window [To Selection]

       

      Say you're in List view and you sort your records (choosing any field) in descending order. Fire the Unsort script above and the active record will be in the center (vertically) of the list. Cool, that's what I want. However, sort your records in ascending order then fire the Unsort script and the active record will be at the top of the list, not what I want.

       

      Am I missing something or is this a bug? I'm running FMPA v15.0.2.220, Mac.

       

      Cheers,

      Rich

        • 1. Re: Scroll Window script step bug(?)
          philmodjunk

          I'd have to test this to be sure, but I've always assumed that the window would scroll until the selection was in view not until the selection was vertically centered. That could place the selection at the very bottom or top of the screen if the selection is not already in view.

           

          So maybe the field with the focus was already in view the time that you found it centered.

           

          I checked FileMaker Help and don't find anything there that would lead me to expect the selection to automatically be centered on the page.

           

          There are a number of posts here in the forum where the following method is discussed as a Kludge that sort of centers the window on the selected field:

           

          Determine whether you need to scroll up or scroll down. If scrolling up, put the focus a half window above the item you want centered in the window, scroll to it and then return focus to that item. If you are going to be scrolling down, do the opposite.