Qlik Community

QlikView Documents

Documents for QlikView related information.

Announcements
The #1 reason QlikView customers adopt Qlik Sense is a desire for a modern BI experience. Read More

Changing default colors of QlikView

Creator
Creator

Changing default colors of QlikView

Hi all,

If you ever had the feeling that the default colors of QlikView are a bit harsh and you want them changed into something a little more subtle or more in line with the style that you use in your dashboard and the default color schemes in qlikview don't do the trick?Knipsel.PNG

There is a way. Even on a QlikView server and this is how:

- set your color scheme to [Custom]

- press Ctrl+m

- add the below code

Sub SetColorPrefs()

Dim UserPrefs

set UserPrefs = _

ActiveDocument.GetApplication.GetUserPreferences

' Set the "Selected" Color

UserPrefs.CustomSelBgColor(1).PrimaryCol.Col = _

RGB (0,0,255) ' Blue

UserPrefs.CustomSelFgColor(1).PrimaryCol.Col = _

RGB (255,255,0) ' Yellow

' Set the "Possible" Color

UserPrefs.CustomSelBgColor(2).PrimaryCol.Col = _

RGB (255,255,0) ' Yellow

UserPrefs.CustomSelFgColor(2).PrimaryCol.Col = _

RGB (0,0,0) ' Black

' Set the Excluded Color

UserPrefs.CustomSelBgColor(5).PrimaryCol.Col = _

RGB (200,200,200) ' Light gray

UserPrefs.CustomSelFgColor(5).PrimaryCol.Col = _

RGB (0,0,0) ' Black

' Set the Locked Color

UserPrefs.CustomSelBgColor(0).PrimaryCol.Col = _

RGB (255,0,0) ' Red

UserPrefs.CustomSelFgColor(0).PrimaryCol.Col = _

RGB (0,0,0) ' Black

ActiveDocument.GetApplication.SetUserPreferences _

UserPrefs

end sub

- press check it should say : *** Ready ***

- press Test

Knipsel.PNG

- and press OK

You will see that the selection colors changed into blue instead of the QlikView green, and possible selections changed into yellow, and you can change this into any RGB color! And please do change it from something different then blue and yellow.

To have this working on a server you need to follow a few different steps, these are as follows:

- Locate your Settings.ini file in C:\Users\username\AppData\Roaming\QlikTech\QlikView.

- Open the file in Notepad and locate the CustSel entries. Select them all and copy.

- On the QlikView Server, stop the QlikView Server Service.

- Locate the Settings.ini file in C:\ProgramData\QlikTech\QlikViewServer.

- Paste the CustSel values from the user Settings.ini file at the bottom of the [Settings 7] section. Save the file and start the QlikView Server.

- Open the document in the browser and see if the new color scheme has been applied. (they must have the [custom] color selected)

Thanks to the QlikView for Developers Cookbook by Stephen Redmond I discovered this.

Another standard color within QlikView is for example the help text.

Knipsel.PNG

It has a very distinct blue color, and you can change this too!

what you first need to do is create a project folder, make a new folder where your QlikView app is located and rename it accordingly with -prj added behind it so if your app is called test.qvw your folder is going to be named test-prj. Now just save your app and in the project folder and the folder will look something like this:

Knipsel.PNG

Open DocProperties.xml with Notepadd++ or something similar and search for <DefaultHelpPopupProperties>

And just change the RGB colors to your liking, you can even remove the question mark icon by clearing, likte this:

<Icon></Icon>


By opening any of the other XXNN.XML files you can change all the properties of the object. even the ones that you can only change very finicky like fonts.


one of the things that I do is open all the XML's and search all and replace all like this:

<FontName>.*</FontName>       --> <FontName>Calibri Light</FontName> (this changes any font in calibri light)

<Font></Font>                             --> <Font><FontName>Calibri Light</FontName><PointSize1000>10000</PointSize1000></Font> (if no font or or size is described (x-as y-as) it is changed like this)


Thanks for reading!


Jasper

Comments
Creator III
Creator III

thanks Jasper for sharing..

I tried the approach mentioned for changing the default colors but didn't worked for me..is their some other setting as well which needs to be done?

0 Likes
Creator
Creator

Did you set the color scheme to [Custom]?

did you press the check button

did you press the test button

and then pressed ok?

It should work without a hitch.

if it is on a server you need to do something a bit different.

0 Likes
Partner
Partner

Does it work for Ajax? for access to report from web-browser?

I have tested it and it doesn't work for Ajax.

0 Likes
Creator
Creator

- Locate your Settings.ini file in C:\Users\username\AppData\Roaming\QlikTech\QlikView.

- Open the file in Notepad and locate the CustSel entries. Select them all and copy.

- On the QlikView Server, stop the QlikView Server Service.

- Locate the Settings.ini file in C:\ProgramData\QlikTech\QlikViewServer.

- Paste the CustSel values from the user Settings.ini file at the bottom of the [Settings 7] section. Save the file and start the QlikView Server.

- Open the document in the browser and see if the new color scheme has been applied. (they must have the [custom] color selected

Thanks to the QlikView for Developers Cookbook by Stephen Redmond I discovered this.

0 Likes
Specialist
Specialist

Hi,

Thanks for sharing!

In my case changing default colors didn't work for ajax, but changing help window colors worked like a charm. I had already worked with editing properties XML file but never with this section.

Great post!

Creator III
Creator III

I am able to change the default colors.

Thanks for sharing!

Creator
Creator

Have you restarted the QlikView service as well? With me it worked like a charm, even by viewing a document via the server. And have you read the instructions specifically for the server santiago.respane

0 Likes
Contributor
Contributor

thanks Jasper for sharing..

modifying the color of help text in my document worked like a charm, but when i switch it to web view it doesn't work can you help me please.?

0 Likes
Version history
Revision #:
1 of 1
Last update:
‎2016-09-06 11:08 AM
Updated by: