On Feb 20, 2014, at 7:09 AM, Nouvelle Collection <
[email protected]> wrote:

Hi Chris, Thanks for your answer. With your MultiHitDemo.py, I tried to
modify like this :

    def OnDown(self, obj):
      self.InSelectMode = True
      self.CatpureMouse()

Try self.Canvas.CaptureMouse()


but a wx.Frame has no CaptureMouse().

Do you think I should rebuild the whole thing around a wx.Window instead of
a wx.Frame ?

Well, a Frame IS a Window...

But anyway, a FloatCanvas is a Window also...

-Chris




(Then there are some methods that are available for wx.Frame but not
anymore for wx.Window...)

Do you have an idea on this ?

Best, J




2014-02-20 1:19 GMT+01:00 Chris Barker <[email protected]>:

> On Wed, Feb 19, 2014 at 3:51 PM, Nouvelle Collection <
> [email protected]> wrote:
>
>> Thanks Chris for answer and example !
>> Indeed, it works great like this (except if we release the mouse button
>> up *outside* of the main Frame window : then self.InSelectMode remains
>> "True")
>>
>
> yup, I thought of that later on -- you could:
>
> Use wx.Window.CaptureMouse() to get that event. then you'll want to call
> ReleaseMouse() in the Left up event. See:
>
> http://www.wxpython.org/docs/api/wx.Window-class.html#CaptureMouse
>
> -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://mailman.paulmcnett.com/cgi-bin/mailman/listinfo/floatcanvas
>
>
_______________________________________________
FloatCanvas mailing list
[email protected]
http://mailman.paulmcnett.com/cgi-bin/mailman/listinfo/floatcanvas
_______________________________________________
FloatCanvas mailing list
[email protected]
http://mailman.paulmcnett.com/cgi-bin/mailman/listinfo/floatcanvas

Reply via email to