Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
how can i change by code the colour or the font etc of the shee label ?
My problem is that is not so easy to identify the active sheet in a document with about ten or more sheet, so i'm
looking for a way to make it more evident !
thanks.
Luca C.
Luca,
Go to Document Properties, tab General, checkbox "hide tabrow".
Luca,
QlikView highlights the active tab with a brighter background and a bold font. If this is not enough, you can disable tab row all together and arrange your own buttons for all the tabs - in this case, you can gain a full control over highlighting options.
cheers!
Thank's
unfortunatly , due to the theme I choose , Qlikview standard isn't enough.
Can you tell me how can i disable tab row?
Thank's.
Luca
Luca,
Go to Document Properties, tab General, checkbox "hide tabrow".
Hi, i found a solution to my problem using some macro on activate and leave sheet.
Unfortunatly to make the leave work i need to store in a var the current active object, because when leave macro starts the active sheet has already switch to the new one.
here the macro
' var to store active sheet
dim MyactiveSheet
' sub linked to OnActivateSheet
sub settabRED
set mysheet=ActiveDocument.ActiveSheet
set MyactiveSheet=ActiveDocument.ActiveSheet
set sp=mysheet.GetProperties
sp.TabAttr.BgColor.PrimaryCol.Col = RGB(255,0,0)
sp.TabAttr.FgColor.PrimaryCol.Col = RGB(255,255,255)
sp.TabAttr.Mode = 2 ' custom colors
mysheet.SetProperties sp
end sub
' sub linked to OnLeaveSheet
sub settabBLACK
set mysheet=MyactiveSheet
set sp=mysheet.GetProperties
sp.TabAttr.BgColor.PrimaryCol.Col = RGB(0,0,0)
sp.TabAttr.FgColor.PrimaryCol.Col = RGB(255,255,255)
sp.TabAttr.Mode = 2 ' custom colors
mysheet.SetProperties sp
end sub
' sub use to set the first value of setMyactiveSheet linked to onOpen
sub setMyactiveSheet
ActiveDocument.ActivateSheet 1
set setMyactiveSheet=ActiveDocument.ActiveSheet
end sub
Bye
Luca C.
Very nice and useful although it gives an error I solved ... probably is just that the name of sub setMyactiveSheet cannot be reused for a variable name? ... I changed variable to setMyactSheet and it works.
Thanks
Flavio
Hi,
yes Flavio, there is a typo.
set setMyactiveSheet = ...
should be
set MyactiveSheet = ...
corresponding to the Dim statement at the very top.
Another useful(?) hint might be this:
I wondered why the script is not working, until I found that I set the color being calculated.
So in order to let the script work smoothly in any case, you might add:
sp.TabAttr.FgColor.PrimaryCol.IsCalculated=false
and
sp.TabAttr.BgColor.PrimaryCol.IsCalculated=false
before setting the RGB colors.
hth,
Thilo
The settabRED function works great, but is there any way to change the color of only part of the text?
For ex. the label is "New Header" and I would like the "New" text to be in black and the "Header" text to be in red-is it possible?