On 27/03/2010 14:29, Werner F. Bruhin wrote:
> Another question.
>
> I like to "append" rackUnits, i.e. not hardcode the startPos.
>
> But I can't find a method/variable in the canvas giving me the extend of
> the existing objects - is there one or how else could I calculate what
> the next free position to the right is?
>    
I found a solution, but is this fine or is there a cleaner one?

         bBox = self.canvas.BoundingBox[1]
         if bBox[0]>0:
             startPos = bBox[0] + 2
         else:
             startPos = 0

Werner

_______________________________________________
FloatCanvas mailing list
[email protected]
http://paulmcnett.com/cgi-bin/mailman/listinfo/floatcanvas

Reply via email to