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.
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.
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..?
- name all of the tabs (say Tab1, Tab2, etc)
- run a script including the calculation:
GetLayoutObjectAttribute ( "Tab1" ; "isFrontTabPanel" ) ; "Tab1" ;
GetLayoutObjectAttribute ( "Tab2" ; "isFrontTabPanel" ) ; "Tab2" ;
to capture the object name that is the current front panel.