Greg Hains Posted May 20, 2007 Posted May 20, 2007 Hi. I am looking to change the background color of a row depending on data in the row. I was thinking of using a technique like changing the text color based on a condition as a field, by having a background block behind the fields on each row and having it change color depending on the condition. My problem is how to identify it as an item in FmPro then change it's attributes as data conditions change. Is it a field? An object? A container? Anybody got any ideas please? Greg
Søren Dyhr Posted May 20, 2007 Posted May 20, 2007 I use the webding fonts "g" char, in a mergefield underneath the other fields or next to them... take a look at the attached template - which deliberately contains socratic noise, so you can't poor it into your solution without getting the gist of it! --sd pling.zip
David Jondreau Posted May 20, 2007 Posted May 20, 2007 I have a Globals table with globally stored containers to hold 1x1 pixel colors. In the field that feeds the portal, I use a calculation field with a container result with the basic form of: Highlight = Case( x=2; Globals::HighlightYellow; x=3; Globals::HighlightRed ) I place Highlight field behind the fields in the portal row.
kmtenor Posted May 21, 2007 Posted May 21, 2007 David: Could you please post an example of how this works? I have tried doing it several different ways, and I have yet to be successful making it function as you say it should. Thanks! -Kevin
Lee Smith Posted May 21, 2007 Posted May 21, 2007 I'm sure that David could post an example, but it will be redundant to several examples that have been posted in the past. Do a search for Background and color, and you should find several. When search for keywords, you can narrow down the results by using a plus sign on those words that must appear in the hit. For your search, it would look like [color:blue]+background +color. HTH Lee
Greg Hains Posted May 22, 2007 Author Posted May 22, 2007 Hi Soren. Thaks for your response. I sort of have this working but have encountered a problem with it (sorry to be a pain in the neck). I place the field, and set the calculation, but the font comes out as Wingdings no matter what I set. What should I do to make sure this Webding font stays as Webdings. Do I need to further configure FmPro to use it? Cheers, Greg
mr_vodka Posted May 22, 2007 Posted May 22, 2007 Try holding down Ctrl-Alt while changing the text type.
Greg Hains Posted May 22, 2007 Author Posted May 22, 2007 Ah! Mr Vodka. Just what the doctor ordered. Thankyou. That worked. (but why? I need to know WHY it worked so i don't make similar mistakes again)
mr_vodka Posted May 22, 2007 Posted May 22, 2007 Because you need to override the default storage option language.
kmtenor Posted May 22, 2007 Posted May 22, 2007 Thank you, Lee. I found an example that I'm hoping will work: Dynamic Color Background Now, let me be more specific about the problems I had: I placed a 1-pixel bitmap into a global container field, and Filemaker reported "Unknown Container Object". When I made the graphic 50x50, the graphic at least showed up. When I placed the global onto the page, I was able to make it appear when I wanted it to appear, but I could not figure out how to make it stretch to fill the space in which I placed the field on the layout. I tried setting the Graphic Format dialog to "Enlarge image to fit frame" and unchecked "Maintain original proportions", but the image only ever filled a small portion of the calculation field as I had positioned it on the layout. I'm sure I'm overlooking one simple thing - and I'm sure that this has already been asked and answered somewhere in the forums. But I haven't yet found the answer, as I'm probably just not searching for the right combination of keywords. Thanks. -Kevin
Lee Smith Posted May 22, 2007 Posted May 22, 2007 A bitmap image, hummm, I don't think I have tried a one pixel bitmap images before. What program did you create this in? Are you trying to create a gradient? Can you attach a copy of the bitmap? Lee
Raybaudi Posted May 22, 2007 Posted May 22, 2007 I placed a 1-pixel bitmap into a global container field... Don't place a so tiny image into the field, put a rectangle instead !
David Jondreau Posted May 23, 2007 Posted May 23, 2007 What I do to create colors is to choose a color in layout mode and make a 50x50 box of it. Then I copy and paste that next to itself and using View Object Info, change it to a 1x1. I copy that, switch to Browse and paste it into a gobal (or a regular container field that loads a global on startup).
Recommended Posts
This topic is 6395 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