Skip to main content
Announcements
Customer Spotlight: Discover what’s possible with embedded analytics Oct. 16 at 10:00 AM ET: REGISTER NOW
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..

1 Solution

Accepted Solutions
er_mohit
Master II
Master II

why you use dollar sign simply write the variable name

see the attached image

View solution in original post

14 Replies
Not applicable
Author

Under Font Propery there is a button Color where you can make color of your text be calculated. Example:

if(vSomeVar = 0, Red(), White())

You can set button color to be calculated too. See Color button in General Tab.

Not applicable
Author

Hi,
I am using following logic but no result..

if($(vSomeVar) = 0, Red(), White())

Not applicable
Author

Hi mohit,
I am using personal edition so plz give me details here only...

er_mohit
Master II
Master II





Change Color On Button Click

/*************************************************************************/

Firstly Create A Variable Vchange =0

then create a button

Right Click On button-->Action-->Add Action--->External---->Set Variable

then On Above side Name Of Variable-->Vchange-->

in Value write--> =If(Vchange=0,1,0)

then on Font Tab Click On Colour  -->Tick on  Calculated -->add Expression

if(Vchange=0,rgb(255,0,0))

hope it helps you

Not applicable
Author

Hi mohit,

It is not working..

I am using...

in actions -> set variable -> variable :   vSomeVar

                                         value    :      =if($(vSomeVar)=0,1,0)

in font -> calculated ->     if($(vSomeVar) =0,rgb(255,0,0))

i want color of text should change to red when button  is active

                                                      white when button is inactive

MayilVahanan

Hi

Try like this

in actions -> set variable

varibale : vSomeVar

value:      =if(vSomeVar = 0, 1, 0)

in font -> calculated

= if(vSomeVar  = 0, white(), red())

Hope that helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
er_mohit
Master II
Master II

why you use dollar sign simply write the variable name

see the attached image

Not applicable
Author

Hi guys,

I am getting following error...

PFA

Not applicable
Author

You need to CREATE the variable first. SomeVar is simply used to denote that you should create 'Some Variable' for use in this situation. Go to Variable overview (Ctrl+alt+v) and create a variable there with the name of your choice.

Use this name that you selected in place of 'SomeVar'.

Hope this helps.

Cheers,

CG