Tissot Posted November 22, 2004 Posted November 22, 2004 Hi, I would like to have my Textbox background Change color on a calculation! Is this possible? Thanks for youre reply!
Ted S Posted November 22, 2004 Posted November 22, 2004 I think the TextColor function only changes the color of the text. I would be surprised if it changed the field's background color. There are some clever but kludgy ways to make the background look like it has changed color by utilizing container fields. I've only done this once before so I'm not the right person to explain it. Do a search on the Forums and I'm certain thay you will find your answer.
-Queue- Posted November 22, 2004 Posted November 22, 2004 You're right. I misread the question. Make the fill transparent and then put a container calculation field behind it. The calculation will be Case( sometest; globalcontainer1; someothertest; globalcontainer2; etc.) GlobalcontainerX can either be one field with multiple repetitions (in which case you would reference it with GetRepetition( globalcontainer; X ) for all repetitions greater than 1) or separate global fields. In Layout Mode, make a box with the desired fill color, then select and copy it, enter Browse Mode, and paste into the appropriate global container field/repetition. Repeat for each color.
Tissot Posted November 23, 2004 Author Posted November 23, 2004 Yep, I get it. It works great! I think it would be a good function to have in FM what do you think ? Thanks guys.
Ted S Posted November 23, 2004 Posted November 23, 2004 Yes it would! Personally I'd have more use for a function that sets background color than one that sets the text color.
Heathbo Posted December 24, 2004 Posted December 24, 2004 I can't seem to get this to work. Can you post an example? Thanks
Newbies Maureen C. Collins Posted March 13, 2005 Newbies Posted March 13, 2005 I am so glad I looked in this forum to solve my "formating of my fill colour via a script problem" your solution was easy and worked a treat. Thanks a lot for passing on your expert knowledge to novices like me.
Newbies Maureen C. Collins Posted March 13, 2005 Newbies Posted March 13, 2005 I am so glad I looked in this forum to solve my "formating of my fill colour via a script problem" your solution was easy and worked a treat. Thanks a lot for passing on your expert knowledge to novices like me.
Newbies Maureen C. Collins Posted March 13, 2005 Newbies Posted March 13, 2005 I am so glad I looked in this forum to solve my "formating of my fill colour via a script problem" your solution was easy and worked a treat. Thanks a lot for passing on your expert knowledge to novices like me.
Himitsu Posted March 13, 2005 Posted March 13, 2005 can I continue with this one? what if I wanted a value that equals the same? I have a calculation field that takes the value of one field and another. What if I wanted that same thing to change color if the value equals the same? Would I have to make a relationship of itself then set the field like: case( fielda=1;goBG ) I know that this won't work because it is only looking at itself and not all records... and, 1 should be a bolean... if it is out of the "" does that make it a bolean?
Himitsu Posted March 13, 2005 Posted March 13, 2005 can I continue with this one? what if I wanted a value that equals the same? I have a calculation field that takes the value of one field and another. What if I wanted that same thing to change color if the value equals the same? Would I have to make a relationship of itself then set the field like: case( fielda=1;goBG ) I know that this won't work because it is only looking at itself and not all records... and, 1 should be a bolean... if it is out of the "" does that make it a bolean?
Himitsu Posted March 13, 2005 Posted March 13, 2005 can I continue with this one? what if I wanted a value that equals the same? I have a calculation field that takes the value of one field and another. What if I wanted that same thing to change color if the value equals the same? Would I have to make a relationship of itself then set the field like: case( fielda=1;goBG ) I know that this won't work because it is only looking at itself and not all records... and, 1 should be a bolean... if it is out of the "" does that make it a bolean?
-Queue- Posted March 14, 2005 Posted March 14, 2005 Do you mean if the value of fieldA equals the value of fieldB, then display a different color? If so, a calc field of Case( fieldA = fieldB; goBG ) should do it. Case( fieldA = 1; goBG ) would only use goBG when the value of fieldA = 1, which could be a boolean if fieldA only contains 1 or zero, in which case Case( fieldA; goBG ) would also work. If fieldA can contain other numbers, then Case( fieldA; goBG ) would return goBG whenever fieldA did not contain a zero and was not empty.
-Queue- Posted March 14, 2005 Posted March 14, 2005 Do you mean if the value of fieldA equals the value of fieldB, then display a different color? If so, a calc field of Case( fieldA = fieldB; goBG ) should do it. Case( fieldA = 1; goBG ) would only use goBG when the value of fieldA = 1, which could be a boolean if fieldA only contains 1 or zero, in which case Case( fieldA; goBG ) would also work. If fieldA can contain other numbers, then Case( fieldA; goBG ) would return goBG whenever fieldA did not contain a zero and was not empty.
-Queue- Posted March 14, 2005 Posted March 14, 2005 Do you mean if the value of fieldA equals the value of fieldB, then display a different color? If so, a calc field of Case( fieldA = fieldB; goBG ) should do it. Case( fieldA = 1; goBG ) would only use goBG when the value of fieldA = 1, which could be a boolean if fieldA only contains 1 or zero, in which case Case( fieldA; goBG ) would also work. If fieldA can contain other numbers, then Case( fieldA; goBG ) would return goBG whenever fieldA did not contain a zero and was not empty.
Recommended Posts
This topic is 7286 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