[wxPython-users] how to get user input from wx.html?
Alec Bennett
whatyoulookin at yahoo.com
Thu Jan 24 13:27:33 PST 2008
Trying this, I get the following error:
Traceback (most recent call last):
File "C:\Python24\lib\forms\form.py", line 75, in
HandleTag
return handler(tag)
File "C:\Python24\lib\forms\form.py", line 81, in
HandleFORM
self.form = HTMLForm(tag,
self.GetParser().GetWindowInterface().GetHTMLWindow())
AttributeError: 'HtmlWinParser' object has no
attribute 'GetWindowInterface'
Here's the code I'm using, is 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)
html = wx.html.HtmlWindow(self)
if "gtk2" in wx.PlatformInfo:
html.SetStandardFonts()
html.SetPage(
"Here is some <b>formatted</b>
<i><u>text</u></i> "
"loaded from a <font
color=\"red\">string</font>."
"<form id='form1' name='form1'
method='post' action=''>"
" <p><input type='text' name='name'>"
" <p><input type='text' name='email'>"
" <input type='submit' name='Submit'
value='Submit'>"
"</form>"
"Hi there"
)
app = wx.App()
frm = MyHtmlFrame(None, "Simple HTML")
frm.Show()
app.MainLoop()
____________________________________________________________________________________
Never miss a thing. Make Yahoo your home page.
http://www.yahoo.com/r/hs
More information about the wxpython-users
mailing list