5 Replies Latest reply on Oct 25, 2015 3:24 AM by kbleicken

    Button Bar question:

      The buttons in the button bar are used to navigate from one layout to another.

       

      In Appearances I've made the fill color of a button bar for 'inactive' blue. All other states, hover, pressed, and in focus  are made black. The goal is once a button is pressed it stays black.

       

      When a button is clicked it goes black, but as soon as the layout is selected the button goes back to blue. Is there any way to keep the selected button black as long as you in the correct layout?

       

      From a UI standpoint it would seem to be important to know which button was selected.

        • 1. Re: Button Bar question:
          PaulWebb

          This link will show you how it is done.

           

          I did the same as you are trying to do when navigating to layouts. For mine I named all the segments the same as the first part of the layout name (ie. Builder Details or Builder List). For my calculation I used...

          Let (

          ~Layout = LeftWords ( Get ( LayoutName ) ; 1 ) ;

          Case (

          ~Layout = "Company" ; ~Layout ;

          ~Layout = "Subdivision" ; ~Layout ;

          ~Layout = "Builder" ; ~Layout

          )

          )

          • 2. Re: Button Bar question:

            Thank you, but how does that change the color to black when on that layout?

            • 3. Re: Button Bar question:
              jbrown

              Hi.

              You have to choose which button in the bar is "Active" for each layout. If you have 3 layouts: Layout 1, Layout 2, Layout 3, and you're on layout 3, you want that button to be active. Click on the "Layout 3" button and in the button bar set up, choose that as the active button.


              That will use the Active state of the buttons in the bar, which is found in the inspector.

               

              You could easily do the calculation, which is more modular. If you NAME each button segment as its corresponding layout name, and use the calc dialog in the Choose-Active segment, you can dynamically choose which is active through this calc.

              • 4. Re: Button Bar question:
                PaulWebb

                The calculation matches the layout name and the button name and then applies the active segment formatting. I put an example file on dropbox that you can check out.

                https://www.dropbox.com/s/94k1ea61bqgtpfm/Button%20Bar.fmp12?dl=0

                 

                kbleicken wrote:

                 

                In Appearances I've made the fill color of a button bar for 'inactive' blue. All other states, hover, pressed, and in focus  are made black. The goal is once a button is pressed it stays black.

                I noticed in your initial post you did not mention the active state. Make sure you set "Active" to black as well.

                • 5. Re: Button Bar question:

                  Thanks for your example Paul. That makes it very clear. Much appreciated.