[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.python

wx.EVT_RIGHT_UP strangeness?

JimT

1/26/2008 7:30:00 PM

I am playing with wxPython 2.8.7.1 on OS X 10.4.11 with MacPython 2.5

When running the demo program, the ShapeWindow demo does not close the
window
on right click. It turns out that the wx.EVT_RIGHT_UP does not fire.

I discovered that one way to get it to fire is to bind the
wx.EVT_RIGHT_DOWN event also.

Thus adding the following two lines solves the problem:

in __init__ add: self.Bind(wx.EVT_RIGHT_DOWN, self.OnRightDown)

secondly add: def OnRightDown(self, evt): pass

Everything then works ok.

My question is: Is this how it is supposed to work, and if not, am I
the only one with
this problem?

2 Answers

Mike Driscoll

1/28/2008 2:36:00 PM

0

On Jan 26, 1:30 pm, sigpo...@hotmail.com wrote:
> I am playing with wxPython 2.8.7.1 on OS X 10.4.11 with MacPython 2.5
>
> When running the demo program, the ShapeWindow demo does not close the
> window
> on right click. It turns out that the wx.EVT_RIGHT_UP does not fire.
>
> I discovered that one way to get it to fire is to bind the
> wx.EVT_RIGHT_DOWN event also.
>
> Thus adding the following two lines solves the problem:
>
> in __init__ add: self.Bind(wx.EVT_RIGHT_DOWN, self.OnRightDown)
>
> secondly add: def OnRightDown(self, evt): pass
>
> Everything then works ok.
>
> My question is: Is this how it is supposed to work, and if not, am I
> the only one with
> this problem?

It works for me without any changes. I right-click the snake image and
it disappears. I'm on Windows XP, Python 2.4/2.5 with wxPython 2.8.7.1

What OS and wxPython version are you using?

You may want to post to the wxPython user's group too. They can tell
you if it is an OS dependent bug or not: http://wxpython.org/ma...

Mike

JimT

1/29/2008 6:02:00 AM

0

Thanks,

I'm using wxPython 2.8.7.1 on OS X 10.4.11 with MacPython 2.5
No doubt it's a Mac thing, I'll take it to the wxPython users.


On Jan 28, 6:36 am, Mike Driscoll <kyoso...@gmail.com> wrote:
> On Jan 26, 1:30 pm, sigpo...@hotmail.com wrote:
>
>
>
> > I am playing with wxPython 2.8.7.1 on OS X 10.4.11 with MacPython 2.5
>
> > When running the demo program, the ShapeWindow demo does not close the
> > window
> > on right click. It turns out that thewx.EVT_RIGHT_UP does not fire.
>
> > I discovered that one way to get it to fire is to bind the
> >wx.EVT_RIGHT_DOWN event also.
>
> > Thus adding the following two lines solves the problem:
>
> > in __init__ add: self.Bind(wx.EVT_RIGHT_DOWN, self.OnRightDown)
>
> > secondly add: def OnRightDown(self, evt): pass
>
> > Everything then works ok.
>
> > My question is: Is this how it is supposed to work, and if not, am I
> > the only one with
> > this problem?
>
> It works for me without any changes. I right-click the snake image and
> it disappears. I'm on Windows XP, Python 2.4/2.5 with wxPython 2.8.7.1
>
> What OS and wxPython version are you using?
>
> You may want to post to the wxPython user's group too. They can tell
> you if it is an OS dependent bug or not:http://wxpython.org/ma...
>
> Mike