Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

List View, alternating row colors


This topic is 6782 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

Sure, don't use a calculation field?

Instead, in layout mode, select the bod ytab and choose an alternating color...

~Genx

Posted

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.

Posted

See if this file is still on John Mark Osborne's site:

[color:blue]Alternate Colors

http://www.databasepros.com/resources.html

Lee

Posted

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

Posted

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.

Posted

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?

Posted

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.

Posted

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

This topic is 6782 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.