Alternating Row Colors?

Scott Rossi scott at tactilemedia.com
Tue Mar 25 05:33:48 EDT 2014


Hi Peter:

I didn't think backgroundColor would span the entire row (line) but it
seems like your option could work -- thanks very much.

Regards,

Scott Rossi
Creative Director
Tactile Media, UX/UI Design




On 3/25/14 1:58 AM, "Peter W A Wood" <peterwawood at gmail.com> wrote:

>Scott
>
>I'm not sure whether you were dreaming or not, but I couldn't find
>anything about alternate rows colours with htmlText or styledText.
>
>Were you looking to avoid having to do something like this?
>
>	put the height of field "Field" into tFieldHeight
>   	put the effective textHeight of field "Field" into tTextHeight
>  	put tFieldHeight into tNumOfLines
>   	divide tNumOfLines by tTextHeight
>   	put the round of tNumOfLines into tNumOfLines
>   	put tNumOfLines into field "Field"
>   	repeat with tLine = 1 to tNumOfLines
>      		put tLine mod 2 into tOdd
>      		if tOdd = 1 then
>         		put "Red" into tBackGrdCol
>      		else
>         		put "Blue" into tBackGrdCol
>      		end if
>      	set the backgroundColor of line tLine of field "Field" to
>tBackGrdCol
>   	end repeat
>
>Regards
>
>Peter
>
>On 25 Mar 2014, at 16:02, Scott Rossi wrote:
>
>> Did I read/hear at some point that it's now possible to create
>>alternating
>> row colors in a field using htmlText or styledText?  Or was this a dream
>> about cheese?
>> 
>> Thanks & Regards,
>> 
>> Scott Rossi
>> Creative Director
>> Tactile Media, UX/UI Design
>> 
>> 
>> 
>> 
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>>subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
>_______________________________________________
>use-livecode mailing list
>use-livecode at lists.runrev.com
>Please visit this url to subscribe, unsubscribe and manage your
>subscription preferences:
>http://lists.runrev.com/mailman/listinfo/use-livecode






More information about the use-livecode mailing list