IEHtmlWindow

Richard Burton mrburton at gmail.com
Tue Aug 22 12:04:20 PDT 2006


Try the following:

html =3D wx.lib.iewin.IEHtmlWindow(self, parent, wx.ID_ANY,
                                         pos=3Dwx.DefaultPosition,
                                         size=3Dwx.DefaultSize,
                                         style=3D0,
                                         name=3D'IEHtmlWindow')

Best Regards,

On 8/22/06, Chris Haynes <chaynes at indiana.edu> wrote:
>
>  Per section 16.3.4 of the wxPython book, I tried the following
> modification of listing 16.3
>
> import wx
> import wx.lib.iewin
>
> class MyHtmlFrame(wx.Frame):
>     def __init__(self, parent, title):
>         wx.Frame.__init__(self, parent, -1, title, size=3D(600,400))
>         html =3D wx.lib.iewin.IEHtmlWindow(self, parent, ID=3D-1,
>                                          pos=3Dwx.DefaultPosition,
>                                          size=3Dwx.DefaultSize,
>                                          style=3D0,
>                                          name=3D'IEHtmlWindow')
>
>         wx.CallAfter(
>             html.LoadString(file('c:/home/201/c/slides.html')))
>
> app =3D wx.PySimpleApp()
> frm =3D MyHtmlFrame(None, "Simple HTML Browser")
> frm.Show()
> app.MainLoop()
>
> with the following result:
>
> Traceback (most recent call last):
>   File "C:\home\python\gui\wxPythonInAction-src\Chapter-16\iehtml.py",
> line 17, in -toplevel-
>     frm =3D MyHtmlFrame(None, "Simple HTML Browser")
>   File "C:\home\python\gui\wxPythonInAction-src\Chapter-16\iehtml.py",
> line 11, in __init__
>     name=3D'IEHtmlWindow')
> TypeError: __init__() got multiple values for keyword argument 'ID'
>
> Commenting out the ID=3D-1 argument (don't know why this helps, since it
> looks like -1 is the default)
> I get:
>
> Traceback (most recent call last):
>   File "C:\home\python\gui\wxPythonInAction-src\Chapter-16\iehtml.py",
> line 17, in -toplevel-
>     frm =3D MyHtmlFrame(None, "Simple HTML Browser")
>   File "C:\home\python\gui\wxPythonInAction-src\Chapter-16\iehtml.py",
> line 11, in __init__
>     name=3D'IEHtmlWindow')
>   File "C:\Program Files\Python24\lib\site-packages\wx-
> 2.6-msw-unicode\wx\lib\iewin.py", line 117, in __init__
>     ID, pos, size, style, name)
>   File "C:\Program Files\Python24\lib\site-packages\wx-
> 2.6-msw-unicode\wx\activex.py", line 440, in __init__
>     newobj =3D _activex.new_IEHtmlWindowBase(*args, **kwargs)
> TypeError: argument number 3: a 'number' is expected, 'NoneType(None)' is
> received
>
> The IDLE stack inspector hanges trying to display the iewin.py frame.
>
> Help much appreciated!
>
> Chris
>



-- =

-Richard Burton
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wxwidgets.org/pipermail/wx-users/attachments/20060822/1ef=
235e9/attachment.htm


More information about the wx-users mailing list