Jump to content
  • entries
    146
  • comments
    3
  • views
    78,988

FileMaker 12 Layout Tricks: Hiding Tabs

Sign in to follow this  
John Sindelar

1,363 views

If you wanted to use a tab control on your layout but hide it from your users, you used to have to cover it with another tab and/or make the tab text very small. This is because you both have to visually hide the tab AND prevent users who actually click on it’s tab controls from activating it. While this worked, the layouts were kind of hard to use in layout mode: it was often hard to find the tabs at all.

Fortunately this is a lot easier in 12. And not only because tab controls work in layout mode(!).

Here is how we’re hiding tabs now.

1. Create the tab as you normally would, but make the tabs big and readable so you can find them in layout mode.

2. Turn the fill and line colors off for the tab.

3. Conditionally format the text to only show in layout mode. (You can conditionally format tab text in 12). Use this calc…

Get ( WindowMode ) ≠ 4

…and when that is true, turn the text size to 300pt, effectively hiding the text.

4. So far we’ve hidden the tab. To disable it in browse mode, create a simple script with one step called “Disable Tab Control”. Create the following steps:

If [ isempty ( Get ( ScriptParameter ) ) ]

Exist Script [Result: 0]

End If

Don’t forget that result = 0 in the exit script line.

5.  Now add an OnTabSwitch script trigger to your tab, calling this script with a script parameter of “Get ( ScriptName )”. This will disable the tabs when they are click by hand in browse mode, but they’ll work when a script is directed to them using Go To Object Name (because there will be a script parameter passed in as the script name).

Best of all, the tabs are easy to read and select in layout mode:

layout.png?w=380

Layout Mode

browse.png?w=380

Browse Mode

Here is a short video of this in action, and there is a great article on the new tabs in 12 on Daniel Wood’s weetbicks blog. Enjoy.

693 693 693 693 693 693 693 b.gif?host=seedcodenext.wordpress.com&bl

Source

Sign in to follow this  

×

Important Information

By using this site, you agree to our Terms of Use.