Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

List View, alternating row colors

Featured Replies

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

Sure, don't use a calculation field?

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

~Genx

  • Author

I hadn't noticed that option for the Body part (must not have been there in FM6) Thanks!

It's a new feature in FileMaker 7.

  • 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.

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

[color:blue]Alternate Colors

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

Lee

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".

  • 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

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.

  • 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?

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.

  • 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

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.