damn
Raymond E. Griffith
rgriffit at vnet.net
Wed Jun 26 15:07:01 EDT 2002
>From: Simon Lord <slord at mac.com>
>I wish to alter the colour of every second line in a fld. If
>any of you are running a Mac then in the iTunes app you'll see
>that all odd lines in your song list are white while the even
>lines are pale blue. I tried using a pattern but failed to
>realize that the pattern was fixed.
>
>So, in the hopes that a solution exists, is there a way to have
>each odd or even line be alternate colour? If you're unnsure of
>what I mean, here is a link to Apple's site which has an image
>that shows you what I mean:
>
>http://www.apple.com/itunes/
>
>Sincerely,
Ahhh, easy as pie, I assure you. And eating it, not making it.
Two fields. A scrolling field (scrollfld) and a rectangular field (listfld).
The rectangular field should not be opaque and is to be placed on top of the
scrolling field so that the scrollbar of the scrolling field is able to be
used. Locktext on both should be true.
Place the following script into the scrolling field.
on scrollbardrag
set the scroll of fld "listfld" to the scroll of me
end scrollbardrag
Place the following script into the listfield
on mouseUp
repeat with i = 1 to the number of lines of me
put cr after k
if i mod 2 = 0 then put i into item i div 2 of x
end repeat
delete char(-1) of k
put k into fld "scrollfld"
set the hilitedlines of fld "scrollfld" to x
end mouseUp
Of course, you don't have to have this script in the listfield. Just make
sure it happens each time the listfield is updated and whenever the card is
accessed.
Hope you like it.
Raymond
More information about the metacard
mailing list