December 27, 200718 yr Hello I have a field that i would like to toggle the font color in. I made the field into a button and I used the following script to make the click turn the font from yellow to green and if it was already green to yellow. If[TextColor ( colors::first ; RGB ( 255 ; 255 ; 0 ) ) //yellow Insert Calculated result[select;TextColor ( Colors::first ; RGB ( 0 ; 255 ; 0 ) )//green Else If[TextColor ( colors::first ; RGB ( 0 ; 255 ; 0 ) ) //green Insert Calculated result[select;TextColor ( Colors::first ; RGB ( 255 ; 255 ; 0 ) )//yellow end But it doesn't do any toggleling when I click on the field as a button. Can someone tell me how I can make the font color toggle this way? Thanks Dave
December 28, 200718 yr Author Thank you so much I was looking for this answer all night long. It means so much that you showed me how to do this Dave Also I do have another concern because in my case I am actually trying to do this exactly with this toggling of the font color: Example: If the field "numbers" contains the word "One" change the text color to purple rgb (150,0,255) if it is already green. But if it is text color is yellow already and the field "numbers " contains the word "one" - i would need the change the color to red. and put the amount of 1 in a field "counted" This is because I want to be able to track all the red text and tabulate it with a running tabulation and maybe more later. So I still need help when the color has become yellow on how to further change the color to red and add the instance as part of a running total. I am making an example file. toggle_font_color.fp7.zip Edited December 28, 200718 yr by Guest
December 29, 200718 yr Author HI Danielle, I am somehow unable to download the file. There is an error message which says the file does not exist. I don't know what that means I am anxious to receive the file but it says it is not there Dave
December 30, 200718 yr Confirmed. I'm wondering, because it Saturday, that this isn't a Site problem. I will report it to Stephen. Lee
December 30, 200718 yr Author Thanks Dave ACTUALLY In my example I am looking to change the font color from green to purple if it is originally green and yellow to red it if is originally yellow. Edited December 30, 200718 yr by Guest
December 30, 200718 yr Author I am not sure what you mean. The problem is trying to download the file from danielle called toggle_font_colorMOD.zip (6.44 KB) Keep getting an error message toggle_font_color.fp7.zip Edited December 30, 200718 yr by Guest
December 30, 200718 yr The file you just attached is available, but the one that Soren attached earlier, needs to be re-uploaded. Lee
December 30, 200718 yr I am somehow unable to download the file. EDIT: it seems that I can't attach anything... all my tries made an unreadable attachment. EDIT 2 Stephen has made a good job! The attachment is now OK ! : toggle_font_colorMOD.zip
December 30, 200718 yr BTW: 1) make the field "font color" a calculation field and calc: Case( random number = "One" and PatternCount ( GetAsCSS ( Self ) ; "00FF00" ) ;TextColor ( random number ; RGB ( 150 ; 0 ; 255 ) ); random number = "One" and PatternCount ( GetAsCSS ( Self ) ; "FFFF00" ) ;TextColor ( random number ; RGB ( 255 ; 0 ; 0 ) ); random number = "Two" ; TextColor ( random number ; RGB ( 255 ; 255 ; 0 ) );//yellow random number = "Three" ; TextColor ( random number ; RGB ( 0 ; 255 ; 0 ) )//green ) 2) make the field "number" a calculation field and calc: PatternCount ( GetAsCSS ( fontColor ) ; "FF0000" )
Create an account or sign in to comment