Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have a few text boxes that when clicked on - it will toggle on/off a criteria I have set under Actions.
Is there a way to change the colour of the box, so I have one colour when it is toggled on and another colour for when it is toggled off.
I hope this makes sense. Let me know, otherwise.
Kind Regards
Kozan
See if this meets your need.
Pressing button switches color back and forth.
Pressing Clear will cause the button to go back to default Blue.
May be you need to do this in Photoshop only. Then use those in your application
Assign Variable some value like On = 1 and Off = 2.
Set the Text box color based on the Variable value like Ex. if(vColor=1,Green(), blue())
create a variable that gets updated when the text box is clicked on.
Like:
let vButtonColor=0
Then in your action Set External >> Set Variable
=not $(vButtonColor)
Then in your object background color select calculated and enter a formula something like
=if((vButtonColor),Red(),Blue())
To do this create a variable for when a textbox is clicked.
In your textbox properties select actions and add. Select "External" from the list on the left and "Set Variable" from the list on the right then hit ok.
In the value box type the formula " =if(VariableName = 0, 1, 0) "
Next click on the general tab. Look for the button next to "Color" under background.
In the Base color area select "Calculated" and enter in the following formula into the expression box.
if(vChange=1, rgb(0,240,16), rgb(210, 210, 210))
Change the RGB values to your desired colour's.
You can apply this process to each textbox that you have and the background colour of each will change on click.
Hope this helps.
I would expect the colour of the text to go back to the original colour if the User hits the clear button. This doesn't happen.
Anyway around this?
I would expect the colour of the textbox to go back to the original colour if the User hits the clear button. This doesn't happen.
Anyway around this?
You would need to add an action at the document level to change the variable value.
On the OnAnySelect level.
something like
if(isnull(GetCurrentSelections()),vButtonColor,)
in the variable name field
and the
Value is still not $(vButton)
Hi Kozan,
There are multiple solution to your query.
1. Add action to your text box which have action for clear all
2. PFA solution.
Regards,
Pankaj
Hi, I don't fully understand how to pull this off. Are you able to do some screenshot or provide a document if not too much trouble.
Apologies for my ignorance, but I am new to this.
I have managed to complete what you mentioned in your earlier post so far, but every time I hit Clear the colour still doesn't reset :
"create a variable that gets updated when the text box is clicked on.
Like:
let vButtonColor=0
Then in your action Set External >> Set Variable
=not $(vButtonColor)
Then in your object background color select calculated and enter a formula something like
=if((vButtonColor),Red(),Blue())"