4 Replies Latest reply on Jan 8, 2012 3:40 AM by Sorbsbuster

    Get Object Name of Current Tab



      Get Object Name of Current Tab



      I have a layout that has a tab panel with around 4 tabs on it.  Each tab has an object name.  When leaving this layout I would like to get the object name of the tab that is infront, or active.  So I can return to that tab it enter opening the lay out again.


        • 1. Re: Get Object Name of Current Tab

          Presumably you are clicking a button, or triggering a script, that takes you to another layout.  Then you want to hit a 'Back' button that takes you back to the original layout and tab.  One suggestion is to set the tab name as the script parameter on the button that takes you away from the layout, and then store it to use to bring you back to that object, the same way as you presumably have stored which layout you navigated from.

          • 2. Re: Get Object Name of Current Tab

            One method is to use getLayoutObjectAttribute with the IsFrontPanel parameter to test all four panels to see which is the current front and then store that object in a variable at the time you use a script to leave the layout.

            • 3. Re: Get Object Name of Current Tab

              The button is not on the each tab panel. Otherwie each tab has a differant button, and returning to the same tab would be much easier.

              There is only one buttonthat move to a new layout and its on the header.

              Is there a sample script around that uses the GetLayoutObjectAttribute with the isFrontPanel parameter when selecting the button..?

              • 4. Re: Get Object Name of Current Tab

                In essence:

                - name all of the tabs (say Tab1, Tab2, etc)
                - run a script including the calculation:

                Case (
                GetLayoutObjectAttribute ( "Tab1" ; "isFrontTabPanel" ) ; "Tab1" ;
                GetLayoutObjectAttribute ( "Tab2" ; "isFrontTabPanel" ) ; "Tab2" ;



                to capture the object name that is the current front panel.