stann Posted September 8, 2004 Posted September 8, 2004 Hi I have a field named "LANE" and I want text to go in it in a certain format I can certainly do that. But is there any way- when the user clicks on the field by making the field into a button to change the color of the text ---- and if the user clicks back again it changes back to the original text color. So with each click It might go from Click =RED to Click again while it is red and change to GREEN and then next click would bring the text back to red and the next click after that would bring it back to green. etc Is there anyway to do this? Thanks for your answers and thought process ............. Stann
stann Posted September 9, 2004 Author Posted September 9, 2004 I am talking about toggling the font color with each click. Is there any answer to this Thanks Stann
QuinTech Posted September 9, 2004 Posted September 9, 2004 Hi Stann, i don't use v7 but i think your strategy here would be to make that button tied to a script that changes the values of three fields: R-Value, G-Value, and B-Value. The script could be something like (in pseudocode): If R-Value = 0 Change R-Value to 255 Else Change R-Value to 0 End If-G-Value = 0 Change G-Value to 255 Else Change G-Value to 0 End Then make the color for your desired field dependent on those three fields. HTH. J
stann Posted September 9, 2004 Author Posted September 9, 2004 Thank you for the answer. I have been trying to get it to toggle but it doesn't seem to be working with my version of filemaker. Does anyone know how to accurately change font color with Filemaker 7? Thanks very very much, Stann
slstrother Posted September 9, 2004 Posted September 9, 2004 Create a number field called "color flag", then the following script will work. Script: Text Color If [ Table::color flag = 1 ] Set Field [ Table::Field; TextColor (Table::Field ; RGB ( 255 ;0 ;0 ) ) ] Set Field [ Table::color flag; 0 ] Else Set Field [ Table::Field; TextColor ( Table::Field ; RGB (0 ;255 ; 0 ) ) ] Set Field [ Table::color flag; 1 ] End If Commit Records/Requests[ Skip data entry validation; No dialog ]
stann Posted September 10, 2004 Author Posted September 10, 2004 This doesn't seem to work for me - do you have a sample file of this by any chance? That would help I am frustrated, cause I can't seem to get it to work Thanks Stann
slstrother Posted September 10, 2004 Posted September 10, 2004 A sample is attached. Click on the field label to toggle between red and green. color_change_sample.zip
Recommended Posts
This topic is 7477 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now