Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Selected tab in different color

Hi ,

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?

9 Replies
Miguel_Angel_Baeyens

Hello,

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))


You're done.

Change the colors and set one value in each tab and that's all.

Hope that helps

johnw
Champion III
Champion III

Whatever sheet you're entering is going to assign a value to vThisTab, so setting it to 0 as you leave shouldn't be necessary?

Not applicable
Author

If i try this all the tabs remain as the variable vThistab =1. In this case the tabs stay red irrespective of if selected or not.



johnw
Champion III
Champion III

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.

Not applicable
Author

Thanks a Lot John.I got it. It is working fine now.

Not applicable
Author

Hi John,

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?

Thanks!

Not applicable
Author

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!

rustyfishbones
Master II
Master II

Try this video I done on YouTube

http://www.youtube.com/watch?v=aEAUHt6GzJA

Not applicable
Author

perfect - thanks so much! it's now working like a charm!