[reportlab-users] flowables side by side

François Heredero - Top Music SA reportlab-users@reportlab.com
Sat, 12 Apr 2003 17:01:19 +0200


> In article <NFBBIPHPCPOCKHNJJPBICEFFDBAA.fheredero@topmusic.ch>,
> François Heredero - Top Music SA <fheredero@topmusic.ch> writes
> >> > 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)
> >I have the error :
> >ValueError: Flowable <FlowCircle at 11441584>... in cell(0,1) can't have
> >auto width in

> You can't have Flowables in columns/rows of unknown width(...)

I get the solution :

MyCircle = FlowCircle()
data = [[MyCircle,MyCircle]]
table = Table(data)
table._argW[0]=8*mm
table._argW[1]=8*mm

Thanks to alls helps me :-)

François

Top Music SA
Z.I. C81 / CP357
CH - 1844 Villeneuve (Switzerland)

(access map on website)
Phone +41(0) 219 604 604
Fax +41(0) 219 604 605
www.topmusic.ch    -     info@topmusic.ch
---------------------------------------
Monday : closed
Tuesday - Thursday : 9:00-12:00 & 13:30-18:30
Friday : 9:00-12:00 & 13:30-20:00
Saturday : 9:00-12h00 & 13:30-17:00
Time : GMT+1

**************************************
* NEW: Pro Music launch his site,    *
* music publisher for wind and brass *
* intruments and band at             *
*       http://www.promu.com         *
**************************************