[reportlab-users] changed font size in table
Timothy Smith
timothy at open-networks.net
Tue Mar 1 16:41:44 EST 2005
Tom Brown wrote:
>On Monday 28 February 2005 16:06, Timothy Smith wrote:
>
>
>>Tom Brown wrote:
>>
>>
>>>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)
>>>
>>>
>>>
>>because you have 'VALIGN' set to 'BOTTOM'
>>
>>
>
>Actually, setting 'VALIGN' to 'BOTTOM' was an attempt to move the text down in
>the cells. The text rides high in the cells and setting 'VALIGN' has no
>effect. In fact, if I didn't set the rowHeights, the text would be partially
>out of the top of each cell.
>
>Thanks,
>Tom
>_______________________________________________
>reportlab-users mailing list
>reportlab-users at reportlab.com
>http://two.pairlist.net/mailman/listinfo/reportlab-users
>
>
>
>
('ALIGN',(0,0), (-1,-1), 'CENTRE'),
More information about the reportlab-users
mailing list