[reportlab-users] Apply stiles to paragraphs in a table

Robin Becker robin at reportlab.com
Sun Nov 5 06:25:57 EST 2006


Paulino wrote:
> I want to apply stiles to some specific rows in a table, base in it's 
> values, but the stile doesn't affect the cells that contain paragraphs.
> 
> How can I handle this?
> 
> The code is as follow:
> style = [ ....]
> 
> linenum = 0
> for line in table :
>            if line[0] > 90 :
>                        style.append( ('TEXTCOLOR', (0, linenum), (-1, 
> linenum), colors.red) )
>            ....
>            linenum += 1
> 

Paragraphs have their own styles. I suppose we could arrange for some of 
the styles to be inherited from the canvas which is what the td styles 
end up affecting, but life is pretty complicated and the canvas may not 
have the styles that you want to change.
-- 
Robin Becker


More information about the reportlab-users mailing list