4 Replies Latest reply on May 26, 2010 6:27 AM by LeoB

    Text field and scroll bar



      Text field and scroll bar


      I have a layout that contains definitions of various technical terms and is linked to the help pages.  It's a simple tabbed layout with one tab for each letter of the alphabet and a text field placed in the tab.  The actual definitions within each tab may be much longer than the available screen space so I have the scroll bar set.  And, I do not want the user to be able to modify the definitions, just view them.


      If I set the field so it cannot be entered in browse mode, which protects the text from modification, the scroll bar is not visible.


      So, I set a small script trigger OnObjectModify that reverts the record.  That does prevent changes while maintaining the scroll bar, but has some problems.


      1. The scroll bar is not visible when the user enters the tab.  The user must click on a blank space for the scroll bar to appear.
      2. Once the script runs, the scroll bar disappears and the user has to click outside of the text to cause the scroll bar to reappear, and
      3. If the user clicks twice on the text, a FMP flashscreen pops up that says "Before typing, press Tab or click in a field, or choose the New Record menu command."

      I tried adding the Set Error Capture [On] in the script, but it does nothing.


      Anybody have any ideas?



        • 1. Re: Text field and scroll bar

          Let's say that your text field is named "Description".


          My suggestion :


          In your table, create a calculation field that only refers to "Description", let's call it "_cDescription".


          On your layout, put "_cDescription" with the scrollbar option. Because it is a calculated field, edition of its contain will not be permitted by filemaker.


          so you have the result wanted without any scripting involved.

          • 2. Re: Text field and scroll bar

            try this:

            In manage database, go into your definitions field and select Options.

            Under the Auto-Enter tab, turn on the "Prohibit Modification of value during data-entry" and under the Validation tab select Always.


            This allows the field to be scrolled in while in Browse mode, but not modified.



            HOWEVER, the drawback to this is if/when YOU the administrator needs to modify the definition field.


            Are you constantly updating/modifying these definitions?

            • 3. Re: Text field and scroll bar

              that's a nice simple one Mystik

              • 4. Re: Text field and scroll bar

                Yep -- that works!


                Per rdowler's comment -- these defintions will seldom be changed once established.  I can create them all as text fields, then convert all the fields to calculation fields when done.


                I knew there had to be a way to do this.


                Thanks all