April 30, 200619 yr I've attached a demo file showing how I've tried to do alternating row colors in list view. I want uc_RowBackground to completely fill each row with the calculated color, but I am unable to get rid of a transparent 1-pixel border. In the demo file, this is where you see the pale purple background peeking through around the edges of the alternating gray and peach boxes. I want for gray and peach to be juxtaposed seamlessly. Can anyone spot what I'm doing wrong? Thanks, Chap ListView.fp7.zip
April 30, 200619 yr Sure, don't use a calculation field? Instead, in layout mode, select the bod ytab and choose an alternating color... ~Genx
April 30, 200619 yr Author I hadn't noticed that option for the Body part (must not have been there in FM6) Thanks!
April 30, 200619 yr Author By the way, is it impossible to do it the way I was trying to? I don't understand why I couldn't completely fill a Calculation field with a solid colored GIF. It might come in handy for some other purpose.
April 30, 200619 yr See if this file is still on John Mark Osborne's site: [color:blue]Alternate Colors http://www.databasepros.com/resources.html Lee
April 30, 200619 yr If you are using a version of FIleMaker previous to 7, there are several files pertinent to this thread in the Resources area of my site when you search for "alternate color".
May 1, 200619 yr Author I overlooked the obvious pre-FM7 solution: use the Body part's fill color as one color, and a Calculation field for the other. This produces the "seamless" alternating bands of color I was after. I had ignored the Body part fill color, and instead used a Calculation field that evaluated to alternately green and blue. This allowed a thin band of Body fill to show through between each row. I'm still puzzled by why (for instance) a 25-pixel tall Calculation field can't be made to display a 25-pixel tall swatch of orange. Instead, it displays a 23-pixel tall swatch centered within a 25-pixel space - regardless of what I set the borders to. There is always a border at least one pixel thick. If I wanted the rows to cycle through, say, THREE colors, or four, I don't see how I could do it seamlessly. Anyway, my immediate problem (seamless alternating colors in List view) is solved. If anyone can explain how to display a graphic container in a calculation field, borderlessly, I'd appreciate it! Thanks, Chap
May 1, 200619 yr Yes, it's true the border of a field will not display your color swatch. So, you have to get creative. You could have a dividing line between each record in the list view by drawing a black line on the top and bottom border of the field. This would hide the border of the field and make it appear the color swatch filled the entire record. I'm sure there are other tricks that others will share here.
May 1, 200619 yr Author Thank you. And, just to be thoroughly pedantic about this, is it also true that it is not possible to create a borderless field that would not create a perimeter around the swatch? Like, width = 0 pixels? I don't see any way, creative or otherwise, to get exactly what I want, which is: a row of red butted up against a row of green butted up against a row of blue, etc. Looks like there must be a visible, one-pixel horizontal line between each color transition. Yes?
May 1, 200619 yr Yes, it is possible; though it is broken in some versions, such as 8.0v1. In layout mode set the field to have all the borders (top, bottom, etc.), ie., check all the boxes. Then set the line thickness to "None". The color should then expand the full size of the field. Your original color block (before copy/pasting) should also have its line width set to none. It may not behave so well on Windows however. I've seen posts that recommended using a larger color block, and setting it to reduce, instead of a small one set to enlarge.
May 1, 200619 yr Author Fenton, Thanks - that's exactly what I wanted to know. I had not tried turning on borders and setting their width to 'none'. This allows the row colorings to juxtapose with absolutely no gap. And thanks for the Windows tip, as well. Chap
Create an account or sign in to comment