Yogesh Agte Posted November 24, 2004 Posted November 24, 2004 Hi All, I want to display a specific word in a field in a different color. Can it be done? What is the way for it? I request to help me with this. Thanks. Yogesh Agte
QuinTech Posted November 24, 2004 Posted November 24, 2004 Hi, Yogseh. This can, actually, be done in version 5, though it's a bit more difficult to implement. You will need one new calc field for each color you want to display. Let's say you have two fields: Name and Color. You want to display the name in either red, green, or (default) black. Put the name field on your layout, and make the text black. That much is obvious. Now create two new calc fields: RedName and GreenName. (Make sure both are unstored.) The calc for RedName is: Case ( Color = "Red" , Name ) and for GreenName: Case ( Color = "Green" , Name ) Now add these fields also to your layout, make them transparent, and set the text color to the appropriate choice. Lay them over top of the Name field, so that they are perfectly aligned. This will simulate changing the color of your text. The only drawback to this idea is that it can make data entry kind of a pain; i recommend just making RedName and GreenName non-enterable and taking them out of the tab order. HTH, Jerry
Yogesh Agte Posted November 29, 2004 Author Posted November 29, 2004 Hi All, Thanks a lot Jerry for you guidance. I was wondering if that could be done in FileMaker Pro 4.1 as well. Would this solution just change the color of a specific word in a field or the whole data in that field? Please help. Thanks. Yogesh.
QuinTech Posted November 29, 2004 Posted November 29, 2004 I believe this can be done in version 4, but it's been a long time since i used it. Any version that supports multiple colors for text and the If statement can implement this. The solution i gave would change the color of the entire text field. If you want to change the color of just one word, you will have to modify the original idea so that there is a calc field that consists of only that word. You can then use the overlays i suggested on only that word. This gets a bit more complicated, though. You will actually need 3 calcs: (1) The entire sentence up to the colored word; (2) the colored word; (3) the entire sentence after the colored word. You could then use three merge fields to concatenate these on the display, being sure to make the calculated (colored) field a merge field as well and laying it exactly over top of the original merge field. HTH, J
Recommended Posts
This topic is 7639 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