I wanted to change the selected tab in the application to different color which makes it easy to differentiate between selected and not selected tab. Is it possible in Qlikview?
First create a variable say vThisTab and set its value to 0.
Second go to Sheet Properties, Triggers, OnActivateSheet, Add Action, External, Set Variable, vThisTab, 1
Third, OnLeaveSheet, Set Variable, vThisTab, 0
Fourth, Sheet Properties, General, Tab Settings, Custom Colors, click on the Tab Color, Base Color, select Calculated and set the following conditional
If($(vThisTab) = 1, RGB(255, 0, 0), RGB(0, 255, 0))
Change the colors and set one value in each tab and that's all.
Hope that helps
Seems to be working for me. See attached. My example is slightly different since I adapted it from an earlier macro example (now using actions), so perhaps one of the differences is significant.
my variable is activeSheet
I'm setting it to text values, different for each sheet
The sheets have color expressions like this: if(activeSheet='Main',lightgreen(),lightblue())
Ah, maybe what you're missing is that you need a different value for the variable for each sheet? If you use 1 for all of them, yeah, they'd all change to the highlight color and stay that way.
I was reading this and it's exactly what I'm trying to do. I just don't know how to write the variable as text values. Would you mind giving me a suggestion?
Lavs - right-click on the tab header > Sheet Properties > Triggers. This is where John is using a Set Variable action to change the variable. The formula to change the colors is in Sheet Properties > General > Tab Settings > Custom Colors > formula. Hope that helps!