scrollingList fld color

Sarah sarahr at genesearch.com.au
Mon Aug 19 21:43:01 EDT 2002


Yes, I have that problem too. The solution is to color not a line but a 
number of characters.
Here is the handler I use to get round the problem.

on colorLine lineNum, fldName, colorSpecs
   put the num of chars in line 1 to lineNum of fld fldName into endChar
   put endChar - the num of chars in line lineNum of fld fldName + 1 
into startChar

   set the foregroundColor of char startChar to endChar of fld fldName 
to colorSpecs
end colorLine

Instead of scripting:
	set the foregroundColor of line 4 of fld "My Stuff" to red
put this handler in your stack script or somewhere accessible and use:
	colorLine 4, "My Stuff", "red"

The colorSpecs parameter can be a color name, RGB triplet or hex format.

Cheers,
Sarah


On Monday, August 19, 2002, at 07:35  pm, sims wrote:

> If I set the foregroundColor of a single line in a scrolling List fld
> to any color, I can no longer click/hilite that line.
>
> I would like to be able to differentiate some lines in a scrolling
> list fld  by using color...any way to do this?
>
>
> atb
>
> sims
>
> ___________________________________________
>
>    http://EZPZapps.com         info at EZPZapps.com
>       Software - Internet Development - Consulting
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>





More information about the use-livecode mailing list