4 Replies Latest reply on Nov 21, 2011 1:47 PM by philmodjunk

    Enable / Disable Controls

    flamecoder

      Title

      Enable / Disable Controls

      Post

      I'm experienced in programming but realively new to programming FileMaker and am looking for how to Enable / Disable  and set the Visible of Controls based on certain conditions. I haven't come across a script step that seems to handle the interface to this extent and wonder it one even exist?

      Thanks,

        • 1. Re: Enable / Disable Controls
          philmodjunk

          You can't really. There are Conditional formatting tricks combined with If steps in scripts that come close.

          If you use layout text for your button, a conditional format can set the size of the text to 500 pts and this will make the text disappear.

          If you use a conventional button, you can use a conditional format to change the text color to a dark grey to simulate the 'disabled' look typical in other apps.

          In both cases, you put the button's script inside an If block that keeps the script from executing if the button is supposed to be disabled.

          This still leaves a spot on your button that will flash black when you click it, but nothing else takes place so this is pretty much the best you can do unless you go to the added extreme of placing the button inside an invisible tab control and using a script with go to object to hide/reveal the button.

          • 2. Re: Enable / Disable Controls
            LaRetta_1

            Hi FlameCoder,

            FileMaker currently (up through vs. 11) does not have ability to display or hide controls. You can 'hide' text, fields and buttons with conditional formatting but the object remains on the layout.  The way it is usually handled so a button is not even clickable or a pop-up never pops until/unless needed, is to put the controls in a one-row portal and use calculation test on whether to display them or not. 

            http://fmforums.com/forum/topic/71794-new-visibility-with-vs-11/

            • 3. Re: Enable / Disable Controls
              flamecoder

              Being able to set control properties is such a basic function of programming. I'm surprise FileMaker has many controls for designing an interface with no simple way to enable/disable them. Is there a place to request wanted features in future releases?