Thanks a lot Chris. It is working fine now.

Actually, the size of the squares are going to be larger (150x150) and they
are going to be the target for drag and drop files and additional
processing (e.g. show the file icon, progress bar, etc.)

I've been working on and off on a project for the last few months. The
programs use Floatcanvas in couple of custom widgets. I will send you a
link to the final program once it is ready.

Thanks again.

Saeed


On 31 December 2011 04:19, Chris Barker <[email protected]> wrote:

> Saeed,
>
> I took a look at your script:
>
> >  I can't get the panel color to change in the canvas (in class AREA). I
> have
> > a feeling I'm doing something wrong but can't figure it out.
>
> The trick is that you never set a scale on the FloatCanvas, and did
> not Show() it either.
>
> You can do that by adding:
>        self.Canvas.ZoomToBB()
>        self.Canvas.Show()
> after:
>        self.drawBGsquare()
>
> what that does is set the scale and pan of the canvas to fit whatever
> is on it. Another opiton is to specify the Bounding Box you want to
> show, which may be what you want:
>
> BB =Utilities.BBox.asBBox( ((self.area_x+50,self.area_y+50),
>
> (self.area_x+200,self.area_y+200))
>                                         )
> self.Canvas.ZoomToBB(NewBB=BB)
>
> However, in general you want to place your wx.Windows on theie parent
> with a sizer or something, and the 50,50 size of the floatcanvas is
> very small -- how do you intend to use it?
>
> Also, in drawBGsquare, does "BG" mean "back ground"? if so, maybe you
> just want to change the background color itself.
>
> I hope this helps,
>
> -Chris
>
>
> --
>
> Christopher Barker, Ph.D.
> Oceanographer
>
> Emergency Response Division
> NOAA/NOS/OR&R            (206) 526-6959   voice
> 7600 Sand Point Way NE   (206) 526-6329   fax
> Seattle, WA  98115       (206) 526-6317   main reception
>
> [email protected]
> _______________________________________________
> FloatCanvas mailing list
> [email protected]
> http://paulmcnett.com/cgi-bin/mailman/listinfo/floatcanvas
>
_______________________________________________
FloatCanvas mailing list
[email protected]
http://paulmcnett.com/cgi-bin/mailman/listinfo/floatcanvas

Reply via email to