mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2025-12-16 01:30:07 +01:00
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:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user