alternating row colors

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
billworld
Posts: 188
Joined: Sat Oct 25, 2008 12:32 am

alternating row colors

Post by billworld » Wed Oct 29, 2008 4:37 pm

Is it possible with table or list controls to set the row color to alternate between two colors in row repetitions?

Jerry Daniels
Posts: 10
Joined: Sat Mar 11, 2006 5:11 pm
Contact:

Post by Jerry Daniels » Wed Oct 29, 2008 4:55 pm

Short answer: yes

Slightly longer answer: yes, see backgroundpattern.

How to do it:

Set the backgroundpattern of the field to the id of an image that is the height of two rows in your list and that, when set, makes your rows have alternating colors.
[img]http://daniels-mara.com/hosted_images/dm_logo.png[/img]
[b]Jerry Daniels[/b]
[size=92]Daniels & Mara, Inc.[/size]
[size=84]Creator of [url=http://glx2.com][b]GLX2 Tools[/b][/url]
Host of [url=http://revmentor.com][b]Rev Mentor[/b][/url][/size]

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Wed Oct 29, 2008 5:05 pm

Hi Bill,

There was a lot of discussion about this subject on the Use List recently. Click here.

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

bangkok
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 937
Joined: Fri Aug 15, 2008 7:15 am

Post by bangkok » Wed Oct 29, 2008 5:10 pm

Mark wrote: There was a lot of discussion about this subject on the Use List recently. Click here.
k
And here with a few "alternative" ways (HTML, fields on the background with blend colors etc.).

http://forums.runrev.com/phpBB2/viewtopic.php?t=1461

billworld
Posts: 188
Joined: Sat Oct 25, 2008 12:32 am

Post by billworld » Wed Oct 29, 2008 6:59 pm

Thanks all. Looks like there's a few different ways to accomplish this. I'll start researching them to get a sense of the pros/cons from a setup and maintenance standpoint.

Wish it was built-in, though. One of the reasons I'm researching RR is to migrate away from FileMaker Pro for an app I'm developing due to all the kludgy workarounds that would be required in FMP to meet my needs (the main problems there are UI issues, no real events/objects model and heavy reliance on loads of 3rd party plug-ins).

Anyway, with the issue of alternating row colors FMP appears to have RR beat hands down.

Maybe RR could be enhanced in this regard?

Thanks again for the pointers. Much appreciated.

keyless
Posts: 211
Joined: Wed Dec 12, 2007 11:21 pm

Post by keyless » Wed Oct 29, 2008 7:10 pm

Does anyone know which method was used in the Rev 2.8.1 documentation stack for the dictionary and glossery?

Post Reply