[reportlab-users] flowables side by side

François Heredero - Top Music SA reportlab-users@reportlab.com
Sat, 12 Apr 2003 13:57:42 +0200


> > I want to write these flowables side by side untils they fill
> > all the with of my frame like :
> > ---------------------
> > | ***** ***** ***** |
> > | *CD1* *CD2* *CD3* |
> > | ***** ***** ***** |
> > | ***** ***** ***** |
> > | *CD4* *CD5* *CD6* |
> > | ***** ***** ***** |
> > | ***** ***** ***** |
> > | *CD7* *CD8* *CD9* |
> > | ***** ***** ***** |
> > ---------------------
> Have you tried tables?!

I've tried, but with this flowables
class FlowCircle(Flowable):
	def __init__(self):
		self.size = 4 * mm
	def wrap(self, *args):
		return (0, self.size*2)
	def draw(self):
		canvas = self.canv
		canvas.setLineWidth(0.1)
		canvas.circle(self.size,self.size,self.size)

But I have the error :
ValueError: Flowable <FlowCircle at 11441584>... in cell(0,1) can't have
auto width in

I'm not sure if I must add a function for auto width. Did you experimented
flowables in a table ?

François