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.

Changing the color of a button when a specific tab is selected?

Featured Replies

I have a layout with a set of tabs that are not visible to the user. I would like to apply condition formatting to a button when a specific tab is selected. So for example, I have a "notes" tab and a "calendar" tab. When the user clicks the "notes" button it take them to the "notes" tab. I would like the color of the button to change so it's clear to the user what they have selected.

 

On a side note, I am sending the user to the tab as by assigning an object name to the tab and then using the "go to object" script step. Is there a newer/better way to do this in FM12?

Yes there is a way... 

You can do this by using container fields. Take global container fields and the different color stored in it as image file.

Then in place of taking the button take another container field which is not global.

Then after that, just with the use of script steps of Tab-control, use SetField[], script step, to store the valid image from the global container fields to the normal container field, which you are using as a button. Hope it is clear to you. If need some more info, reply back to me.

  • Author

Thanks fmbug. I was trying to make it work using the new tab features in FM12.

Get ( TriggerCurrentTabPanel )
Get ( TriggerTargetTabPanel )

and the script trigger "OnTabSwitch"

I had read about them a while ago but I was having trouble getting them to work how I wanted.

I eventually got it working. Here is an example for anyone else that is interested:
tab_control_experiment_v1.0.1.fmp12.zip

post-84508-0-98523400-1374743692_thumb.p

  • 5 weeks later...

Thanks Halburn...

For sharing these things.

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.