Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Hiding control depending on the tab

Featured Replies

  • Newbies

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

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.

  • Author
  • Newbies

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é

You can try using the new Refresh Object script step.

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

  • Author
  • Newbies

Thanks a lot, I'll be trying all of this!

best, André

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.