4 Replies Latest reply on Nov 17, 2011 10:31 PM by RayCologon

    Is there a script command to scroll the active window to the left or right?

    JohnE00

      The Window Scroll script step appears only to contol up and down scrolling.

       

      I tried naming an object at the extreme right of my layout and then used a GoToObject script step, but that doesn’t seem to work.

       

      If I name a field and use the GoToObject script step, it does work, but it activates the field, when all I want to do is scroll the screen to the right.

       

      Any other option?

        • 1. Re: Is there a script command to scroll the active window to the left or right?
          keywords

          The Move/Resize Window allows you to do this with the current window.  You have to specify where you want the window to move to, but can do this dynamically based on the window's current position using the Get ( WindowTop ) and Get ( WindowLeft ) functions.  Hope that helps.

          • 2. Re: Is there a script command to scroll the active window to the left or right?
            RayCologon

            JohnE00 wrote:

            I tried naming an object at the extreme right of my layout and then used a GoToObject script step, but that doesn’t seem to work.

             

            Hi John,

             

            You're on the right track. There's no explicit script command for scrolling window content to the left or right, but you can work around the problem using a couple of Go To Object[ ] commands targetting objects other than fields.

             

            Attached is an example that achieves the scrolling effect via script - cleanly - by placing focus on a pair of objects objects (a button then a one-row portal) on either side of the layout. There are no visual artifacts because the portal is invalid (has no rows) and therefore cannot be selected, and importantly, operating the Scroll script will not change the commit state of the record (ie if it is open it will remain open, if closed it will remain closed).

             

            Hopefully this will give you some ideas you can work with.

             

            Regards,

            Ray

            ------------------------------------------------

            R J Cologon, Ph.D.

            FileMaker Certified Developer

            Author, FileMaker Pro 10 Bible

            NightWing Enterprises, Melbourne, Australia

            http://www.nightwingenterprises.com

            ------------------------------------------------

            • 3. Re: Is there a script command to scroll the active window to the left or right?
              JohnE00

              Ray,

              I greatly appreciate the generosity of your time.  I've looked at the sample you provided.  I used to think of myself of an intermediate user; I must now change that to 'beginner.'   

               

              A question about your sample: how did you create the (invalid) portal?  When I try to create one, everything is grayed out except the drop-down menu "SHOW RELATED RECORD FROM:",  and it defaults to "unknown." When I try to change that value, it won't allow me to select the current table, which it appears that you somehow did.

               

              John

              • 4. Re: Is there a script command to scroll the active window to the left or right?
                RayCologon

                JohnE00 wrote:

                When I try to change that value, it won't allow me to select the current table, which it appears that you somehow did.

                 

                Hi John,

                 

                You don't need to replicate the specific portal configuration I chose to use - it just needs to be a portal that isn't showing any related records - so any portal (that will always be empty) will do.

                 

                Rather than complicate (or so I thought) the demo I posted - by adding extra Graph structure just to base the portal on - I simply pasted in a portal that was already configured to point at a table occurrence with the same name as the one in the example file. The idea was to keep the demo as lean and simple as possible - apologies if I inadvertently made it appear more challenging than it needed to be!

                 

                Regards,

                Ray

                ------------------------------------------------

                R J Cologon, Ph.D.

                FileMaker Certified Developer

                Author, FileMaker Pro 10 Bible

                NightWing Enterprises, Melbourne, Australia

                http://www.nightwingenterprises.com

                ------------------------------------------------