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

How to change the Color of the tab

Hi,

How to change the color of the tab, when it is active and inactive. i.e, when someone is viewing the tab, it should be green color and if he moves away to the next tab, it should change to yellow color.

Pascal

8 Replies
Not applicable
Author

Goto Layout,click on caption there are numerous option for active and inactive colors u can change it from there..

Not applicable
Author

Hi Anwar

The one you suggested will work for objects inside the tabs. But I need to change the color of the tab itself. We set the color of the tab through

Settings-> Sheet Properties-> General-> Custom Color (Under Tab settings).

There we dont have active and inactive color. Is there any other way to do that?

Pascal

Not applicable
Author

u must have caption setting tab..from there only u can change active n inactive color.

Not applicable
Author

ohh..u want to change color of sheet's tab,for that u need to write macro,check in macro which sheet is open if sheet is open then assign value to variable

e.g v.SetContent "1",true and use this varible in sheet setting color scheme in calculated color.

u have to chck in macro as below

sub test

set v = ActiveDocument.Variables("var name")

if sh01 is active then

v.SetContent "1",

else

v.SetContent "2",

end if.

end sub.

and use this varible in color.

Not applicable
Author

Thanks for the suggestion.

I am not good at macro. I tried the way , you suggested, but I get syntax error. It would be great, if you can explain me in detail.

I created a variable "var", but dont know , what to give in Definition.

Not applicable
Author

Macro will take sometime to process,i suggest u alternate best solution:-Smile

u can hide tabrow from document setting's tab by click on check box :hide tabrow.

And creat button in place of tabs.and then call ur sheet from these button..and color these button as per ur requirment..it is fast n easy n will definily look gud

rustyfishbones
Master II
Master II

Add this to the custom color tab in the General tab of sheet properties

IF (SUBFIELD (GETACTIVESHEETID (),'\', 2) ='SH01', GREEN (), YELLOW ())

Aurelien_Martinez
Partner - Specialist II
Partner - Specialist II

Better:

On Scritp (or on variables overview):

SET vTabColor = IF (SUBFIELD (GETACTIVESHEETID (),'\', 2) ='$1', GREEN (), YELLOW ());

And on the custom color tab in the General tab of sheet properties you write:


$(vTabColor(SheetId))


With this solution you can change color of all sheet with one modification


Regards,

Aurélien

Help users find answers! Don't forget to mark a solution that worked for you!