When I run this program under Linux/GTK the handler is called
once each time the button is clicked (which is what I
expect/want). Under WinMe, it's called twice each time the
button is clicked.
Why?
---------------------------------8<------------------------------------
import wx
class MyFrame(wx.Frame):
def __init__(self,parent,title):
wx.Frame.__init__(self,parent,-1,title)
s = wx.BoxSizer(wx.HORIZONTAL)
b = wx.Button(self,-1,"Connect")
self.Bind(wx.EVT_BUTTON, self.handleConnect, b)
s.Add(b)
self.SetSizerAndFit(s)
def handleConnect(self,event):
event.Skip()
print "handleConnect",event
class MyApp(wx.App):
def OnInit(self):
frame = MyFrame(None, "Button Test")
frame.Show(True)
self.SetTopWindow(frame)
return True
app = MyApp(False)
app.MainLoop()
---------------------------------8<------------------------------------
···
--
Grant Edwards gedwards@rivatek.com
Staff Engineer
RivaTek, Inc.