Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

mekaminsky
New Contributor III

List box with variable dependent background color

Is it possible to have a List Box Background Color to change, depending on a specified Variable value?

1 Solution

Accepted Solutions
vishsaggi
Esteemed Contributor III

Re: List box with variable dependent background color

Just use Background color of the text box and write expression like

= IF(vVariable = 1, Green(), LightGray())

Capture.PNG

View solution in original post

14 Replies

Re: List box with variable dependent background color

Please make it clear about the business, Is that is interview question?

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
mekaminsky
New Contributor III

Re: List box with variable dependent background color

Hi Anil,

I don't understand your English, sorry...

Could you please rephrase your reply for making it easier for me to understand.

Thanks.

/Hans Kaminsky

Re: List box with variable dependent background color

I am asking, Please explain in detail..

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
mekaminsky
New Contributor III

Re: List box with variable dependent background color

Aha,ok.

My variables can have the values 1 or 0.

When a specific variable has the value 1, I want the relevant List box background color to be green.

When the variable has the value 0, I want the List box background color to be grey.

Ok?

Re: List box with variable dependent background color

Like this?

Capture.PNG

Capture.PNG

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
vishsaggi
Esteemed Contributor III

Re: List box with variable dependent background color

May be this might help. There is not straight forward background color for listbox. Just use a different Style in Presentation tab and use Background button.

Read this:

how to change background colour of a list box

mekaminsky
New Contributor III

Re: List box with variable dependent background color

Hi, I wrote List Box, but what I really meant was TEXT BOX (sorry about that..!)

So, how can the background color of a Text Box dynamically be set depending on the value of a Variable?

(green when the Variable = 1, grey when the Variable = 0)

vishsaggi
Esteemed Contributor III

Re: List box with variable dependent background color

Just use Background color of the text box and write expression like

= IF(vVariable = 1, Green(), LightGray())

Capture.PNG

View solution in original post

mekaminsky
New Contributor III

Re: List box with variable dependent background color

Hi, I wrote List Box, but what I really meant was TEXT BOX (sorry about that..!)

So, how can the background color of a Text Box dynamically be set depending on the value of a Variable?

(green when the Variable = 1, grey when the Variable = 0)