[reportlab-users] Table borders

Jerkize reportlab-users@reportlab.com
Fri, 3 Sep 2004 18:34:53 -0700


Greetings,

First time posting...  I'd like to recommend to the developers that 
table borders get drawn after the cell contents.  It *seems* like a 
fairly trivial patch.  My modified copy seems to be working fine.  
Maybe it's like that by design, but then I'd argue that's not the 
"correct" choice :-)

Thanks a lot for the library.

-Erik



$ svn diff tables.py
Index: tables.py
===================================================================
--- tables.py   (revision 2425)
+++ tables.py   (working copy)
@@ -906,7 +906,6 @@
      def draw(self):
          self._curweight = self._curcolor = self._curcellstyle = None
          self._drawBkgrnd()
-        self._drawLines()
          if self._spanCmds == []:
              # old fashioned case, no spanning, steam on and do each 
cell
              for row, rowstyle, rowpos, rowheight in map(None, 
self._cellvalues, self._cellStyles, self._rowpositions[1:], 
self._rowHeights):
@@ -923,6 +922,7 @@
                          cellval = self._cellvalues[rowNo][colNo]
                          cellstyle = self._cellStyles[rowNo][colNo]
                          self._drawCell(cellval, cellstyle, (x, y), 
(width, height))
+        self._drawLines()


      def _drawBkgrnd(self):