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

Reply via email to