Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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
Champion III
Champion III

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
Anil_Babu_Samineni

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

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

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)
Anonymous
Not applicable
Author

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

Anil_Babu_Samineni

I am asking, Please explain in detail..

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

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)
Anonymous
Not applicable
Author

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?

Anil_Babu_Samineni

Like this?

Capture.PNG

Capture.PNG

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

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
Champion III
Champion III

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

Anonymous
Not applicable
Author

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
Champion III
Champion III

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

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

Capture.PNG

Anonymous
Not applicable
Author

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)