3 Replies Latest reply on May 23, 2012 4:52 PM by philmodjunk

    Creating a "Dead" button using conditional formatting

    ahcho

      Title

      Creating a "Dead" button using conditional formatting

      Post

      Hello!

      I would like to create a button that goes "dead" after a condition is met. Currently, I can make the text of the button disappear so visually it looks like the button is gone but I can still press it and it executes the attached script.

      Is there a way to nullify the button so that even if the user can't see it, it can't be pressed?

      Aaron

        • 1. Re: Creating a "Dead" button using conditional formatting
          dzittin

          The way I handle  this:

          At the top the script associated with the button setup that does the "pre-dead" action:

          if (condition was met previously) {

             exit script

          end if

          otherwise.....execute the code that leads to the condition change

           

          For the button external view: the conditional is

          if (condition is met) then use a ghosty color for the button label  # to indicate that a button press is a waste of time

          else

          use dark color  #to indicate a press will change the condition

           

          I do not believe there is a way to conditionally deaden a button - it is script implemented by you in whatever script handles the button push.

          -D

           

           

          • 2. Re: Creating a "Dead" button using conditional formatting
            dzittin

            My reply "For the button external view: the conditional is"

            should have read 

            For the button extern view: the conditional format formula is....

            • 3. Re: Creating a "Dead" button using conditional formatting
              philmodjunk

              You cannot actually disable the button like you can in some system. As dzittin has suggested, you can include an If step that keeps anything from happening when the "disabled" buttton is clicked. From the options I see in FileMaker 12, you can clean this up a bit more by removing the appearance change that occurs when the button is clicked. That affects the button appearance when it is both enabled and disabled, but that may work for you in many situations as the mouse click may immediately change layouts or do some other very visually obvious action and thus the color change on mouse down isn't really noticeable.