Jump to content
Server Maintenance This Week. ×

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


This topic is 3900 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 5 weeks later...

This topic is 3900 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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