3 Replies Latest reply on Jun 11, 2012 6:04 AM by philmodjunk

    Button state In Focus

    user21370

      Title

      Button state In Focus

      Post

      One of the new features in FM12 is the different styles you can give fields and buttons depending on their state (normal, in focus, hover).

      The state 'in focus' in combination with fields that's no problem. Only when I use it in combination with a button I can't get it working. What I want is that the button has the state In Focus if it's on the corresponding Layout.

       

        • 1. Re: Button state In Focus
          philmodjunk

          To put the focus on a button means that instead of the cursor being in a field, the "focus" is on the button such that pressing enter "clicks" the button. If that's what you want, You can give the button an object name (Use the Name box on the inspector's position tab) and then a script can use go to object to put the focus on that button. An OnLayoutEnter trigger can perform such a script.

          But the button will loose the focus once you start editing fields on this layout...

          • 2. Re: Button state In Focus
            user21370

            Oke, thanks for the feedback. I interpreted it as that it is possible to give the button an other design when it's on the corresponding page.

            Example:

            - NORMAL design red button white text - FOCUS design white button red text

            - So when you are on the Product page the Home button has the normal state en the Product button has the Focus state.

            Or do I have to solve this in a other way.

            • 3. Re: Button state In Focus
              philmodjunk

              The question is what happens AFTER to give the button the focus?

              Focus on a specific button on your layout will be very ephemeral. Almost any interaction you have with the layout will change the focus and the format you've defined for the button when it is in focus will then not be visible.