How to color a "cell"?

Mark Waddingham mark at livecode.com
Fri Jun 24 01:24:39 EDT 2022


On 2022-06-23 23:54, Richard Gaskin via use-livecode wrote:
> Thanks Mark - works. I could have sworn I'd tried "line" earlier when
> attempting to set the backgroundColor, and when it failed was when I
> switched to trying "paragraph". But it works now so I don't mind being
> mistaken.
> 
> Oddly, "paragraph" appears to be synonymous with "line" for the
> borderWidth, borderColor, firstIndent, leftIndent, textAlign,
> spaceAbove, hGrid, vGrid, and tabs paragraph properties.

I suspect you have dontWrap set and possibly 'table-mode'.

> Near as I can tell backgroundColor is the only paragraph properties
> where the "paragraph" chunk type isn't synonymous.

If you check the htmlText you can easily see the difference between
using 'paragraph' and 'line' to set the aforementioned properties.

When set on 'line' - the properties appear on the 'p' tags, and they
have an effect on a per (wrapped) paragraph basis.

When set on *all other string chunks* (which reduce to char chunks) -
the properties appear as runs in the 'p' tags, and they have an effect
on runs of text.

Warmest Regards,

Mark.

-- 
Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps



More information about the use-livecode mailing list