4 Replies Latest reply on Apr 23, 2013 8:40 AM by philmodjunk

    how to pass control to the active tab

    SamThomas

      Title

      how to pass control to the active tab

      Post

           hi..when we click on button of the tab its go to another layout so how can we pass the control to the active tab 

        • 1. Re: how to pass control to the active tab
          philmodjunk

               If you go to another layout, the tab control on the first layout will not be on the new layout. On the new layout, there is no active tab, only a default tab you specify in layout setup. Perhaps you are changing records rather than layouts. Perhaps you have two tab controls with corresponding panels. Perhaps you are leaving the layout and returning to it.

               So I'm not quite sure what you are trying to do, but all the possible scenarios come down to giving each "panel" of your tab control an object name and using go to Object in your script to select a specific tab panel and make it the front panel.

               How you detect which tab panel on your original layout is the active panel will depend on whether you are using FileMaker 12 or an older version. There are new script triggers and get functions in v12 that greatly simplify this for v12 users. It can be done in older versions, but the scripting is more complex.

          • 2. Re: how to pass control to the active tab
            SamThomas

                 can u give me a example...how to write it.???

            • 3. Re: how to pass control to the active tab
              SamThomas

                   I'm not used it for record ..4 layout onlyy...

                   (1st layout-Tab b(supppose there are three tab a,b,c ) -Button--> go to layout 2 ..- Do dmthngg -> return to 1st layout Tab b)

              • 4. Re: how to pass control to the active tab
                philmodjunk

                     Hey, we don't charge you by the word. Feel free to post more complete descriptions. It really helps us to help you. wink

                     What version of FileMaker are you using? 12 or an earlier version? This makes a very large difference in my answer and I don't choose to type in both approaches when only one will work for you.

                     With either 11 or 12 version, you can use the inspector to give each tab panel an object name:

                     Enter Layout Mode.

                     Click to select the tab control. Click again on a tab to select the tab panel.

                     Enter an object name for the panel into the Name box at the top of the Inspector's Postion Tab.

                     Repeat for each tab panel where you need this capability.

                     Now, if you name a tab panel "tab 1" in the inspector,

                     Go to Object ["Tab 1"]

                     will pop the tab 1 panel to the front.

                     Detecting which tab panel was "active" at the time you leave the layout is what differs greatly depending on whether or not you are using FileMaker 12.