Add a button handler to the sample.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@73846 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2013-04-24 02:42:45 +00:00
parent c80bd61bf4
commit 6b67dec655

View File

@@ -15,10 +15,16 @@ class Frame(wx.Frame):
hwin = HtmlWindow(self, -1, size=(600,400))
name = os.path.join(os.path.dirname(sys.argv[0]), 'widgetTest.html')
hwin.LoadPage(name)
hwin.Bind(wx.EVT_BUTTON, self.OnButton, id=wx.ID_OK)
def OnClose(self, event):
self.Destroy()
def OnButton(self, event):
print('It works!')
app = wx.App()
top = Frame("wxpTest")