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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

change color of text on button after click event

hi guys,

Is there any solution for changing color of text on button.
After i click on button i want the color of text should get changed so that it can be easily identified which button is clicked...

thanks..

14 Replies
MayilVahanan

HI

Go to Variable overview (Ctrl+Alt+v) and create a variable there with the name "vSomeVar"

Hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Not applicable
Author

Hi,

Go to Variable overview (Ctrl+Alt+v) and create a variable there with the name "vSomeVar".

Hope it helps.

Cheers,

CG

Not applicable
Author

Hi guys,

Now i have again new issue.
I completed the first task now new issue is...

I have 4 buttons ( closed won, closed lost, lead dead and open opportunities)

I want the functionality as below:

1) whenever i click on closed won then color of text should get changed to red and rest buttons should be in white text...

2) same functionality to other buttons also...

Right now whenevr i click on any button it changes color to red and again selecting other button it also changes to red but previous button color remains same.....

PFA

Not applicable
Author

Hi again, this is very easily done. To make it easier to remember which values correspond to what, do the following:

For Closed Won:

In actions -> set variable

varibale : vSomeVar

value:      =if(vSomeVar = 'Won', '', 'Won')

in font -> calculated

= if(vSomeVar  = 'Won', red(), white())

For Closed Lost:

In actions -> set variable

varibale : vSomeVar

value:      =if(vSomeVar = 'Lost', '', 'Lost')

in font -> calculated

= if(vSomeVar  = 'Lost', red(), white())

For Lead Dead:

In actions -> set variable

varibale : vSomeVar

value:      =if(vSomeVar = 'Dead', '', 'Dead')

in font -> calculated

= if(vSomeVar  = 'Dead', red(), white())

For Open Opportunities:

In actions -> set variable

varibale : vSomeVar

value:      =if(vSomeVar = 'Open', '', 'Open')

in font -> calculated

= if(vSomeVar  = 'Open', red(), white())


All this does is interchange the value of vSomeVar with a word contained in the button text (so you can easily remember which is which). The font colour then checks if the value in vSomeVar corresponds with it's button text and switches to red if it does.

Hope this helps!

Cheers,

CG

Not applicable
Author

thanks clevergoat...

it worked