I think you need to test each of the panels using the GetLayoutObjectAttribute ( "objectName" ; "isFrontTabPanel" ).
It has been a little while, but I vaguely remember using a Case ( ) statement to test the object names to see which one is the front panel.
- By "menu tab" do you just mean tab panel?
- Do you have tab panels within other tab panels? If so, are you trying to get to the "main" tab panel or down to the individual tab panel that may be on another?
- Are your tab panel object names consistent?
- Does the active object always have a name? (You'll need one)
- What are you clicking to trigger this script? If it's a button (as opposed to a field) you can't get the button name as the activelayoutobjectname. This means either passing the name as a hard-coded script parameter, or consider using a field with onObjectEnter (where you can get ( activelayoutobjectname ) ).
You could also GetLayoutObjectAttribute ( "objectname" ; "enclosingObject" ). I, for example, have a recursive custom function that will start from a given object name and find the enclosing object until it comes to an object name that starts with "tab".
Also consider that if you have the name of the current object, you could just return to that, and you'd end up getting to the tab, subtab, portal, etc. that it's on.
2. No, the tab panels are by it self in that layout.
3. They have individual names. I have set the name in inspector, position, name.
5. I clicking a button.
The purpose whit the button is to print out a order from the current layout. The order have it's own layout. After the printout I want it to go back were I started. And in the same tab.
Is the menu: Kund, Kliché, ....
my script so far is: in Swedish,
1 of 1 people found this helpful
If you want to save some status (this case selected tab panel) in current layout, I prefer using "New Window" then do jobs and close it.