Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Learn how to migrate to Qlik Cloud Analytics™: On-Demand Briefing!
cancel
Showing results for 
Search instead for 
Did you mean: 
sridhar_sigired
Creator
Creator

Button color should change when selected

Hello,

Can anyone please help me to change the color of button when we select it.

Button color is blue right now, where as when we select it should change to green color.

Thanks.

12 Replies
sridhar_sigired
Creator
Creator
Author

Community support is awesome. thank you all for your replies.

Here i have three buttons.

Button 1

Button 2

Button 3

I need to set a action where if click on button two (activate as green color), remaining buttons should go back to non selected mode (inactivate to blue color).

For one button, the above variable method is working. Whereas may i know how can we set this with multiple variables.

jsingh71
Partner - Specialist
Partner - Specialist

Follow this:

1. Take Three Buttons

     1. First

     2. Second

     3. Third

2. Take one Variable like "vClor" and assign 0 to it.

3. Now on First button set below action on "Set Variable"

  =if(vColor=1 or vColor =2,0,0)

them First button only write below expression under Calculated with in Base color area:

=if(vColor=1 or vColor =2,0,0)

4. follow this step for Second and Third Button

     Second Button:

          =if(vColor=0 or vColor =2,1,1)

          if(vColor=1,Green(), Blue())

     Third Button

          =if(vColor=1 or vColor =0,2,2)

           if(vColor=2,Green(), Blue())

Digvijay_Singh

Like this!