4 Replies Latest reply on Jul 8, 2015 2:49 PM by gregfox

    Change Color of Tab

    Terri

      Title

      Change Color of Tab

      Post

           Hi, I would like to know how to change the color of the tab (just the tab name part) on my tab control. I've read other posts and it appears it has something to do with GetLayoutObjectAttribute but I don't find any explanation of where/how/what to do with this. Is it conditional formatting? I don't want to change the entire tab view, just the top tab part when it is selected. I've named my tabs in the Inspector (first, second). So now what?

        • 1. Re: Change Color of Tab
          philmodjunk

               It depends on what version of FileMaker you have. Are you using version 12?

          • 2. Re: Change Color of Tab
            Terri

                 Sorry, FMPro 11 Advanced

            • 3. Re: Change Color of Tab
              philmodjunk

                   Conditional formatting cannot be specified for a Tab Control in versions prior to FileMaker 12.

                   Thus, if you want to do this, you have to replace the tab panel lables with layout text that uses a conditional format expression to change the appearance of the text.

                   Then you need to give each tab panel an object name by entering a name into the "Name" box at the top of the inspector's position tab.

                   I would have thought that this expression would then work to change the color of some layout text when the specified tab panel was clicked:

                   GetLayoutObjectAttribute ( "PanelObjectNameGoesHere" ; "isFrontTabPanel" )

                   But it isn't working for me.

                   What does work is to use a script performed by the OnObjectModify script to set a global variable:
                   If [ GetLayoutObjectAttribute ( "Tab1" ; "isFrontTabPanel" )]
                      Set Variable [$$FrontPanel ; "Tab1"]
                   Else
                      Set Variable [$$FrontPanel ; "Tab2"]
                   End IF

                   Then I can use:

                   $$FrontPanel = "Tab1"

                   in a conditional format expression to change the layout text's color or other text/color formatting.

              • 4. Re: Change Color of Tab
                gregfox

                Is there no way to simply select a tab and have its color changed. I would like to see the different colored tabs when the none of the tabs are elected. It was possible to do in FM9. 

                The themes all have colors associated with the tabs, so obviously they are changeable somehow.