5 Replies Latest reply on Dec 20, 2012 8:26 AM by Claw'd

    Questions about Tab Layouts

    Tim_Ballering

      I must confess ignorance on a subject I should know. Though I've used FileMaker extensively, starting in the pre Claris days before it had "Pro" attached to its name, I have never used the FMP built in tab layout elements. Rather we use graphic elements to create our own tab format.

       

      Now as we are testing and preparing our databases for FMP 12 the thought came to me that as the tab control is a native FMP element that it would have lower overhead than our graphics and may offer better performance, particularly in WAN applications. Is this an accurate assumption?

       

      If the above assumption is valid, then I have questions on using the tab layouts. Reading the FMP help files and Google have not helped me get my head around the concept. For example it appears that the tabs cannot natively switch to layouts from different table occurances.

       

      Can someone point me to a good, concise tutorial or example file on using tab layout design?

       

      Thanks

       

      Tim Ballering

        • 1. Re: Questions about Tab Layouts
          RubenVanDenBoogaard

          Hi Tim,

           

          Native tabs have far less overhead then the old method.

          I generally use the old method for the the main tabs, (in my case generally the different parts of the system Adresses/Orders/Invoices etc.)

          that makes it easier to swich between different tables. But within a main tab I use the FM tabs. Where you can put all your tabs in one layout.

           

          It is even possible to use a scriptrigger on a tab to do certain functions when switching. You could use a CF (see the Brian Dunning site) to see in which tab you are. Use the 'goto object' step to go to the correct tab when you switch back to the layout from a script.

           

          And native tabs use the same table occurance as the layout.  that is why I use graphice tabs for my main tabs which work nicely.

           

          Have a nice weekend!

           

          Best regards,

           

          Ruben van den Boogaard

          Infomatics Software

          ruben@infomatics.nl

          • 2. Re: Questions about Tab Layouts
            Bobster

            Hi Tim,

             

             

            On 16/06/2012, at 9:02 PM, tabrentals wrote:

             

            “For example it appears that the tabs cannot natively switch to layouts from different table occurrances."

             

            In fact, they can.

             

            Although we are restricted to one TO per layout, you can repeat the same tab object on several layouts and create the illusion that, when a tab is clicked-on, the layout doesn't change, but the tab object appears to show content from another Table Occurrence.

             

            The advantage of this is that you can use a tab object, alone, as your entire interface and it can be set to stretch or shrink as the layout is resized, using Left, Right, Top and Bottom anchors.

             

            To achieve it requires an OnObjectModify trigger applied to the tab object. The script identifies the name of the tab object clicked-on and takes the user to a Layout -- the name of which matches the name of the tab that was clicked. Not hard to do.

             

            As Ruben points out:

             

            “You could use a CF (see the Brian Dunning site) to see in which tab you are. Use the 'goto object' step to go to the correct tab when you switch back to the layout from a script.”

             

            This tip would refer to tabs that are 'internal' to the main interface tab in my example. However, I gather that (I haven't tried it yet) the new functions available in FM12 which can identify and save the front-most tabs on any layout, obviate the need for any CFs.

             

            Regards,

             

            Bob.

             

             

            Bob Stuart

            Lord Of The Files

            Think Data Pty Ltd

            Noosa

            Queensland

            Australia.

             

            +61 7 5442 5624

            +61 413 350 993

            1 of 1 people found this helpful
            • 3. Re: Questions about Tab Layouts
              Mike_Mitchell

              Bob's right. In FM 12, there are a couple of new Get functions - Get ( TriggerCurrentTabPanel ) and Get ( TriggerTargetTabPanel ), to be specific - that allow you to avoid some of the custom function / object name trickery we used to have to use.

               

              HTH

               

              Mike

              • 4. Re: Questions about Tab Layouts
                Tim_Ballering

                Mike and Bob made this much easier than I expected.

                 

                Get ( TriggerCurrentTabPanel ) and Get ( TriggerTargetTabPanel ) did the trick.   A little trial and error before I realized it returns a pair of values and you need to use GetValue() to extract the one you want, either tab number of object name.

                 

                Thanks,

                 

                Tim

                • 5. Re: Questions about Tab Layouts
                  Claw'd

                  This demo file shows a way of using the new triggers and could easily be used to switch layouts

                   

                  https://fmdev.filemaker.com/thread/68507