2 Replies Latest reply on Nov 1, 2013 6:43 AM by philmodjunk

    scroll text box to top upon entering it.



      scroll text box to top upon entering it.


           I have a database with a large text box that I want it to scroll to the top. When I leave text box and come back to it, it is always scrolled to the bottom. I have made this text box the "main window" to read the text just like a book. I have tried to write a script with little success.  I don't understand why it scrolls to the bottom when I leave it? Have any tips for me?



        • 1. Re: scroll text box to top upon entering it.

               Let me preference this by stating I have not tested your situation to see if this is standard behavior.  I am taking your word that it is.  I never noticed it before.  Anyway here is something you could try.

               Create a copy of the table occurrence that contains the field you want to scroll.  Relate the key field to each other.  Now place a portal on your layout showing fields from the copied table occurrence.  Set the portal up to show only 1 row and place the field you want to scroll back to the top in it as a merge field.  There is an option in the portal set up to return the portal to the top on exit.  This should get the behavior you want however the field will not be editable.


          • 2. Re: scroll text box to top upon entering it.

                 Since this is a single large field instead of a portal, I'd see if the OnObjectEnter trigger can be set to perform a script that uses the Set Selection step to put the cursor at the 0 position in the field.