[reportlab-users] rounded edges in tables

Dinu Gherman gherman at darwin.in-berlin.de
Thu Apr 24 08:23:22 EDT 2008


Arkadi Colson:


> Something like attached...


I have a hack to do the table in the attached file. Replace (or
subclass!) reportlab.platypus.tables.Table._drawBox with this
(needs fixing when your table consumes less than the available
space):

def _drawBox(self, (sc, sr), (ec, er), weight, color, count,
space):
self.canv.roundRect(sc, sr, self._width, self._height, 5,
stroke=weight)

The real challenge is the "inline" text, at least if you don't
simply want to overwrite a table frame (which might lead to back-
ground issues)...

Regards,

Dinu

-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_platypus_toc3.pdf
Type: application/pdf
Size: 7659 bytes
Desc: not available
Url : <http://two.pairlist.net/pipermail/reportlab-users/attachments/20080424/9c8bd1d9/attachment.pdf>
-------------- next part --------------



More information about the reportlab-users mailing list