Alternating rows in a list

Frank D. Engel, Jr. fde101 at fjrhome.net
Wed Apr 20 08:19:13 EDT 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

It's too bad HTML tables are not supported; that would make these 
questions SO much easier to deal with:

<table width="100%">
<tr><td bgcolor="#00ffff">Line 1</td></tr>
<tr><td bgcolor="#ffffff">Line 2</td></tr>
<tr><td bgcolor="#00ffff">Line 3</td></tr>
<tr><td bgcolor="#ffffff">Line 4</td></tr>
</table>


On Apr 20, 2005, at 1:29 AM, Gordon Tillman wrote:

> Howdy Varen,
>
> About your post:
>
>> I'm trying to format a list field which displays plain old html with 
>> a list of links. I'd like to format the list so that each link in the 
>> list is an alternating color such as white, light grey, white, light 
>> grey, etc.....
>
> Here is an example which may get you started..
>
> Given a simple stack with one card that has two fields on it:
>
> (1) field "htmlFld" that displays the information, and
> (2) field "entryFld" where you can enter sample HTML to play with.
>
>
> Field "entryFld" has the following script:
>
> on enterInField
>   set the htmlText of field "htmlFld" to me
> end enterInField
>
> And I entered the following into field "entryFld":
>
> <font color="black">Line 1
> <li><font color="green">Line 2
> <li><font color="blue">Line 3
>
> When you hit enter with the cursor in field "entryFld", then field 
> "htmlFld" displays this:
>
> Line 1
> Line 2
> Line 3
>
> The first line is black, the second line is green, and the third line 
> is blue.
>
>
> OK, here is another idea...
>
> Given a card with a field that contains the list of data to colorize, 
> this script will set the colors to alternate:
>
> on mouseUp
>   local tColor1, tColor2, tLastColor
>   put "blue" into tColor1
>   put "green" into tColor2
>   put tColor1 into tLastColor
>   local tLine
>   repeat with tLine = 1 to the number of lines of field 1
>     set the textColor of line tLine of field 1 to tLastColor
>     if tLastColor is tColor1 then put tColor2 into tLastColor
>     else put tColor1 into tLastColor
>   end repeat
> end mouseUp
>
> --gordon
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>
- -----------------------------------------------------------
Frank D. Engel, Jr.  <fde101 at fjrhome.net>

$ ln -s /usr/share/kjvbible /usr/manual
$ true | cat /usr/manual | grep "John 3:16"
John 3:16 For God so loved the world, that he gave his only begotten 
Son, that whosoever believeth in him should not perish, but have 
everlasting life.
$
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)

iD8DBQFCZkjB7aqtWrR9cZoRAk8CAJ9fCT9xlxzrKVFMRwngS7oRVqNMDQCfZnI6
8Sf9aQc1K0KWfm+FeNj0LuM=
=VCUE
-----END PGP SIGNATURE-----



___________________________________________________________
$0 Web Hosting with up to 200MB web space, 1000 MB Transfer
10 Personalized POP and Web E-mail Accounts, and much more.
Signup at www.doteasy.com



More information about the use-livecode mailing list