You can put a rectangle having the same color as the background over each tab, define it as a button which does a beep and control their visibility with Hide when, but it will look like a mouth with missing teeth... here's a quick implementation.
showhidetabs.fmp12.zip 66.4 K
3 of 3 people found this helpful
If, instead of a tab panel, you use a slide control and put a button bar above it to act as the "tabs", you can set a hide when for each button in the bar, and the other "tabs" will fill up the space. Just set each button in the button bar to go to the appropriate slide panel.
The effect is just as though you had honest-to-goodness tab hiding.
You can hide the right most tabs, changing remaining tab labels' length to long enough.
Fantastic thank you everyone! :)
I've started using the button bar with a slide panel, with it's settings set to hide the dots and not allow slide.
This way you can set a hide condition for each "tab" and the users won't be able to access the slide panel, until the go to object script step is triggered from the button bar.
Works great in my solution.
I had this problem. I had a 8 tab section which contained some Financial tabs that not all Users should be able to access. So I re-designed the Tabs into 2 sets and placed the set of Tabs I wanted to hide on another layout with a 'Goto' button that only the correct Users could use. Also I restricted certain Privilege sets from 'seeing' even that layout (just in case).
Hope this helps.
As an addition this here's another solution:
1. Double click the Tabs in question to select Tab Control Setup.
2. Select the Tab name you want to hide.
3. Click 'Specify' and use a Script like :
If ( get(AccountPrivilegeSetName) = "(privilegeset)" ; "(tabname)" ; ""
(you can use Case if you have multiple types of users)
4. Click 'Rename' (important or it won't work).
5. Then select all items on the tab you want to hide.
6. Click 'Data' tab in Inspector.
7. Click 'Hide object when' (in Behaviour) and use similar script:
If ( get(AccountPrivilegeSetName) = "(privilegeset)" ; 1 ; 0
(except you only need 1 or 0 as an answer).
Hey presto! When (privilegeset) sees the tabs they will see a blank small tab with nothing on it.
It will look more like a spare tab for later use. I put these types of tabs at the end of the tab set so they don't look like part of the main tab set.
Hope this helps.
ps I tend to use Global Variables set at user login for Privilege Sets but the 'get' function is just as fine I think.
+1 I do not use tab panels any more, but use as Chris says, the button bar and slide panels. It's jut so much more flexible a solution. once you learn how these two can work together, and hiding buttons in the bar (or changing them dynamically) you may never go back.
If ( get(AccountPrivilegeSetName) = "privilegeset" ; 1 ; 0 )
can be simplified to just:
get(AccountPrivilegeSetName) = "privilegeset"
that will evaluate to a result of 1 or 0 without need to use an if function to get it.
You can set the width of the tabs to 0 and you will not see them and will not be able to choose it. You must set another way for selection of a tab.
I give a name in Position to each tab and by script use GoToObject ( name ).
True, but since we now have slide controls and button bars, it's a bit simpler to set up a slide control with a button bar serving as the tab labels to do the same thing.
As I have some (big) problems with development with FMP15, this is a good way to do what you need with FMP11, 12, 13, and 14 without using news properties of FMP15.
Ok but you can also use buttons instead of button bars with that slide control to get the same result.