Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Frank_Hartmann
Master II
Master II

colour of active tab

Hi QV community,

is it possible to apply a different colour to a tab when the tab is activated?

Thanks for your help!

1 Solution

Accepted Solutions
rubenmarin

Hi Frank, you can create a variable vActiveSheet, add an action OnActivate sheet that assign a value to vActiveSheet, each sheet assigns a different value.

Then you can set custom tab color like:

Sheet1: =If(vActiveSheet=1, Red(), Green())

Sheet2: =If(vActiveSheet=2, Red(), Green())

Maybe there is a better way, but this idea can work.

View solution in original post

4 Replies
rubenmarin

Hi Frank, you can create a variable vActiveSheet, add an action OnActivate sheet that assign a value to vActiveSheet, each sheet assigns a different value.

Then you can set custom tab color like:

Sheet1: =If(vActiveSheet=1, Red(), Green())

Sheet2: =If(vActiveSheet=2, Red(), Green())

Maybe there is a better way, but this idea can work.

Frank_Hartmann
Master II
Master II
Author

Thank u very much

Peter_Cammaert
Partner - Champion III
Partner - Champion III

To change a tab color whenever a sheet is moved to the front, you can use a color expression like this in Sheet Properties->General->Tab settings->Tab Color

=If(SubField(GetActiveSheetId(),'\',2) = 'SH01', white(), black())

or

=If(WildMatch(GetActiveSheetId(), '*SH01'), white(), black())

Don't forget to change the tab text color as well.

Peter

rubenmarin

GetActiveSheetId(), that's the function I was looking for but didn't appear in help index.


Frank, I think Peter's solution is better, as you can avoid the action to set value for the variable and the variable itself.