[wxPython-users] how to get user input from wx.html?
Alec Bennett
whatyoulookin at yahoo.com
Thu Jan 24 15:05:30 PST 2008
Hmm, still can't get the event to fire. Here's my
code, anything obviously wrong?
import wx
import wx.html
import forms
class MyHtmlFrame(wx.Frame):
def __init__(self, parent, title):
wx.Frame.__init__(self, parent, -1, title)
self.Bind(forms.form.EVT_FORM_SUBMIT,
self.OnFormSubmit)
html = wx.html.HtmlWindow(self)
if "gtk2" in wx.PlatformInfo:
html.SetStandardFonts()
html.SetPage(
"<form id='form1' name='form1'
method='get' action=''>"
" <p><input type='text' name='name'>"
" <p><input type='text' name='email'>"
" <input type='submit' name='Submit'
value='Submit'>"
"</form>"
)
def OnFormSubmit(self, event):
print "submit!"
app = wx.App(redirect=0)
frm = MyHtmlFrame(None, "Simple HTML")
frm.Show()
app.MainLoop()
____________________________________________________________________________________
Looking for last minute shopping deals?
Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping
More information about the wxpython-users
mailing list