November 22, 200421 yr Hi, I would like to have my Textbox background Change color on a calculation! Is this possible? Thanks for youre reply!
November 22, 200421 yr 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.
November 22, 200421 yr 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.
November 23, 200421 yr Author 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.
November 23, 200421 yr Yes it would! Personally I'd have more use for a function that sets background color than one that sets the text color.
March 13, 200520 yr Newbies 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.
March 13, 200520 yr Newbies 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.
March 13, 200520 yr Newbies 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.
March 13, 200520 yr 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?
March 13, 200520 yr 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?
March 13, 200520 yr 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?
March 14, 200520 yr 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.
March 14, 200520 yr 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.
March 14, 200520 yr 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.
Create an account or sign in to comment