November 1, 200421 yr I know in FM 7 you can manipulate text colour, font, etc. based on the value of the text (such as if status is Open, the text is green, if it is closed, the text is red). BUT, is there a way to manipulate the background colour of a text area the same way? Reason for my asking is that I have a button to submit a record. Over that button I have a text area with a transparent background showing the status (unsubmitted). I want to change the background colour of the text area to match the background of the record/layout when the record is submitted, so the button "disappears".
November 2, 200421 yr A couple of members on here helped me with the same thing, here is what helped me. If you need a copy of the database I worked on let me know. Generally you need a new calculation field and some global fields. The calculation would look something like: Case( fieldname = "Bronze"; g_bronze; fieldname = "Silver"; g_silver; fieldname = "Gold"; g_gold; g_white) Into the g_fields you insert a rectangle with the respective colour, which is displayed by the calc field depending on the content ot the original field. You only have to make the calc field an exact copy of the original, place it behind and make the original transparent. Dave
November 2, 200421 yr If your global fieldnames contain the desired color, as in Dave's example, you can use GetField instead of Case. GetField("g_" & fieldname) If the field background is white, then you shouldn't need a g_white either, as it would be blank if there were no result.
Create an account or sign in to comment