1 Reply Latest reply on Dec 23, 2010 9:20 AM by philmodjunk

    How to invisible a button

    Abhaya

      Title

      How to invisible a button

      Post

      hello everybody... There is a form that contains both employee and non_employee parts.so when one click the employee button ,the non_employee button must be invisible and viceversa. so tell me how to do this

        • 1. Re: How to invisible a button
          philmodjunk

          Unlike some systems, you can't set a visibility property to hide/reveal layout elements. There are ways to create the same effect in FileMaker, however.

          1. Create three layouts that are identical in every way except for your three buttons. One layout shows both buttons, one layout shows just the employee button and the third shows the non-employee button. Clicking a button selects the layout needed to "hide" the other button.
          2. Put the buttons inside a tab control with at least two tabs. Make the tab control invisible by making fill and border colors either transparent or the same color as the layout background. Give each tab an Object Name in the Inspector. When the user clicks a button. Use Go To Object in the button's script to select the tab needed to hide or reveal objects.
          3. Put the buttons inside a portal to a related record. Set up the button's script to change a field value or a global variable so that either a portal filter (filemaker 11 only) or the defined relationship for the portal no longer matches to the related record. Any object within the portal, such as your button, then vanishes from view. You can create one portal for each button you want to hide/reveal.

          With all of these methods, script triggers that use OnRecordLoad can check field values and select the initial values or tabs to show/hide objects consistent with the current state of that record.