[reportlab-users] Re: Reporlab patches

Robin Becker reportlab-users@reportlab.com
Sat, 4 Jan 2003 00:14:48 +0000


In message <200301040008.24168.cuni@programmazione.it>, Antonio Cuni
<cuni@programmazione.it> writes
.....
First off can you submit your patches to reportlab-users@reportlab.com  
that way other users will see them. 

Secondly, do your patches affect the way the original styles are
interpreted?

If they do then they will have a deleterious effect on existing code?

I have no doubt that the existing tables/tablestyles are not the
'best'/'right' way to do tables, but they are now in use and so some
inertia lies between us and a better solution to tabular layout.
 
>
>tableStyle = TableStyle([
>    ('FONT',  (0,0),   (-1, 0),  'Times-Bold', 14),   # highlight first row
>    ('FONT',  (0,-1),  (-1, -1), 'Times-Bold', 16),   # highlight last row
>    ('ALIGN', (-1,0),  (-1, -1), 'RIGHT'),         # last column right-aligned
>])
>
>Using my addition we can write the same style IMHO much clearer:
>
>tableStyle = TableStyle([
>    ('FONT',  Row(0),  'Times-Bold', 14),   # highlight first row
>    ('FONT',  Row(-1), 'Times-Bold', 16),   # highlight last row
>    ('ALIGN', Column(-1), 'RIGHT'),         # last column right-aligned
>    ])
>
>I've written classes for RowRange and ColumnRange, too. I needed to add only
>few lines of code, without modifying anything else.
>I'd like to submit a patch, if you feel this useful: can I do? What have I to
>do?
>
>ciao Anto

-- 
Robin Becker