1 Reply Latest reply on Jan 25, 2013 2:30 PM by philmodjunk

    Go Back to Tab Panel from Different Layout

    hoffmanjan@umkc.edu

      Title

      Go Back to Tab Panel from Different Layout

      Post

           I am trying to grab the Tab Name and store in a Global Variable so I can go back to the correct Tab Panel.  I use the ActiveLayoutObjectName but it does not capture anything.  

           I named each tab using the Inspector.

           Set Variable [$$LastTab; Value: Get ( ActiveLayoutObjectName )]

           I can see that nothing is getting stored here because I have the $$LastTab variable on the Layout.

           Then I use Go To Layout (Layout Name)

           and Go To Object ($$LastTab) on next line in script. 

           I am obviously missing something here.

           Can you explain?

           Thx,

           JanH

        • 1. Re: Go Back to Tab Panel from Different Layout
          philmodjunk

               An "active" layout object is an object that currently has the focus. That object is very likely not a specific tab panel. If you have a cursor sitting in a field in you tab panel, for example, that field object, not the tab panel is the active layout object. If you press tab and a button highlights, the button object has the focus. I don't think you can give a tab control the focus, but even if you can, it's not likely to be 100% reliable for this purpose.

               If you are using FileMaker 12, there's a nice set of new script triggers and get functions you can use to capture the object name of the currently selected tab panel.

               If you are using an older version, you can use an OnObjectModify Trigger on the tab control to perform a script each time a tab panel is selected. That trigger can perform a rather laboriously constructed script that uses a series of IF-ElseIf steps with GetLayoutObjectAttribute to determine which panel is the font panel.