Newbies avallejo Posted January 19, 2015 Newbies Posted January 19, 2015 Hi all. What I want is to hide some text I placed in the footer unless I'm in a certain tab. I see a "hide control" property , but I can't figure out how to construct the command or script to put into it... Any hints? best, Andre
eos Posted January 19, 2015 Posted January 19, 2015 I see a "hide control" property , but I can't figure out how to construct the command or script to put into it. Assuming that you mean the “Hide object when” setting in the Inspector, try this calculation: not GetLayoutObjectAttribute ( "yourTabPanelObjectName" ; "isFrontPanel" ) Note that this function uses an object name (that you assign to the tab panel in the Position tab of the Inspector). Don't use the tab panel's title. You'll also need a mechanism to refresh the display; you could write a single-step script with “Refresh Window” (leave the options at the bottom unchecked) and attach that script to the tab control with an OnObjectModify trigger. Depending on your workflow, there may be a better solution for hiding (or placing) the object; hard to say. 1
Newbies avallejo Posted January 20, 2015 Author Newbies Posted January 20, 2015 Hi eos. Thanks for the answer. I did try it, and indeed the text disapear, but then it won't apear when I enter the tab. I did attach the Refresh Window script to the tab control, but no success... I'll keep trying...! André
Charity Posted January 20, 2015 Posted January 20, 2015 You can try using the new Refresh Object script step. 1
LaRetta Posted January 20, 2015 Posted January 20, 2015 Hi Andre, It should work fine as eos describes. Here is a sample file. One thing ... as Charity suggests, you should use Refresh Object[] instead of Refresh Window[]. Both would work but now in 13, Refresh Window[] works REALLY well (as it should have worked for years but didn't) and it refreshes the entire window (all objects) which is a very heavy hit. Use it only if *nothing else works. Refresh Object[] just refreshes the object you specify so it is very light-weight. :-) Another option which is even more resource-efficient ... since it only applies if that tab is showing, it might be more user-intuitive if it appears on the tab itself. * I would go further and say that, if the only way to get the necessary screen refresh is to use Refresh Window, it would be worth considering a different interface approach. There are exceptions such as some portal refreshes but use it cautiously. HidingObjects.fmp12.zip 1
Newbies avallejo Posted January 21, 2015 Author Newbies Posted January 21, 2015 Thanks a lot, I'll be trying all of this! best, André
Recommended Posts
This topic is 3662 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now