Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Not applicable

Change selection color

Is it possible to change selection color in list from green to any other color

1 Solution

Accepted Solutions
Partner
Partner

Re: Re: Change selection color

Ok Prakash,

Do the following:

1) Press ctrl+M ( To open Edit Module Window).

2). Then Paste 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

4) Click on Check Button to Check the code if it is showing '***Ready*****' then click on click on test button to execute the code.

Now again go to document properties and do the same which I tell you earlier. If Still facing problem let me know.

--Jai

View solution in original post

19 Replies

Re: Change selection color

Hi,

There is not Much Option to change Selection Color but you can do this in

Go To Document Property->-General>Selection Apperantice,

Try Style and Color Scheme,

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Partner
Partner

Re: Change selection color

It is Possible.

Go to Document Properties and then under Genral Tab, select Custom from color scheme drop dpwn.

color.png

Not applicable

Re: Change selection color

Hi Max,

In Color Scheme [Custom] option is there but by choosing custom option where we can set color

Thanks,

Prakash

Not applicable

Re: Change selection color

Hi jsingh71,

I've set color scheme to custom, but can u please tell me from where u've set blue color after choosing custom scheme.

Thanks,

Prakash

Partner
Partner

Re: Re: Change selection color

Its automatically takes the blue color.

For mor detail find the attachment. Still have any issue let me know.

Not applicable

Re: Change selection color

Hi,

I've opened your file but it is showing selection in Green color which is showing blue in your system,

Is there any other setting affecting on that

Capture.JPG

Thanks,

Prakash

thornofcrowns
Valued Contributor II

Re: Change selection color

There is a way to manipulate the colours using a QAR, google for "qlikfix any colour, as long as it's green"

Partner
Partner

Re: Re: Change selection color

Ok Prakash,

Do the following:

1) Press ctrl+M ( To open Edit Module Window).

2). Then Paste 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

4) Click on Check Button to Check the code if it is showing '***Ready*****' then click on click on test button to execute the code.

Now again go to document properties and do the same which I tell you earlier. If Still facing problem let me know.

--Jai

View solution in original post

Not applicable

Re: Change selection color

Hi Prakash,

You can change color of selected field ...follow below instructions

Settings -> Document Properties -> General -> Color Scheme and choose [Custom].

now

Go to Settings -> Document Properties -> Triggers

add to "OnOpen"

Action Type: External / Run Macro

Name the Macro and Pest the following code...

sub [Enter Name of your Macro]

set up = ActiveDocument.GetApplication.GetUserPreferences

up.CustomSelBgColor(1).PrimaryCol.Col = RGB (255,0,0)

ActiveDocument.GetApplication.SetUserPreferences up

end sub

Then TEST it & done it

Thanks & Regards,

Harshal Patil