[reportlab-users] changed font size in table

Tom Brown brown at esteem.com
Mon Feb 28 17:02:55 EST 2005


I changed the font size in my tables to 8. This causes the text in the cells 
to be misaligned vertically. Why isn't the text centered in the cells?

Here is my code to create the tables:

  def getTable(self, data):
    style = [
      ('GRID', (0,0), (-1,-1), 0.5, colors.grey),
      ('FONTSIZE', (0,0), (-1, -1), 8),
      ('VALIGN', (0,0), (-1, -1), 'BOTTOM'),
    ]
    rowHeights = len(data) * [15]
    return Table(data, rowHeights=rowHeights, style=style)

Thanks,
Tom


More information about the reportlab-users mailing list