On Sat, Dec 31, 2011 at 5:49 AM, Saeed H. Al Turki <[email protected]> wrote:
> 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.

Sounds good -- I'm curious to see what you've done.

I was wondering because it looked in your sample like you were using
coordinates from your parent panel to calculate coordinates for your
FC object -- that's a bit odd, as the point of FC is that your
"natural" coordinates are independent of the pixel coords used to
actually draw, and even those would be relative to the FC window
itself, rather than the parent window.

But maybe that was a quick sample to test with...

-Chris



> 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
>



-- 
--

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