Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
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?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
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..

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
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

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
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)