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!
Ruben van den Boogaard
1 of 1 people found this helpful
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.
Lord Of The Files
Think Data Pty Ltd
+61 7 5442 5624
+61 413 350 993
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.
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.