simple browser ?

I'm trying to implement wxIEHtmlWin, but it won't work

<-code->

from wxPython.wx import *

class MyFrame(wxFrame):
def __init__(self,parentt,id,title):
  wxFrame.__init__(self,parentt,id,title,wxDefaultPosition,wxSize(800,550))
  self.CreateStatusBar()
  self.SetStatusText("simple browser")
  self.ie = wxIEHtmlWin(self, -1, style = wxNO_FULL_REPAINT_ON_RESIZE)
  self.ie.Navigate("http://www.google.be")

class MyApp(wxApp):
def OnInit(self):
  frame = MyFrame(NULL,-1,"simple browser")
  frame.Show(true)
  self.SetTopWindow(frame)
  return true

app = MyApp()
app.MainLoop()

Jonas Geiregat wrote:

I'm trying to implement wxIEHtmlWin, but it won't work

You should have gotten a NameError exception on wxIEhtmlWin because you didn't import iewin. (The traceback probably flashed in a stder output window that got killed immediately because of the exception. If you add a zero to the MyApp constructor and run from a command line then you'll see things like that better.)

Modified code:

from wxPython.wx import *
from wxPython.iewin import *

class MyFrame(wxFrame):
  def __init__(self,parentt,id,title):
   wxFrame.__init__(self,parentt,id,title,wxDefaultPosition,wxSize(800,550))
   self.CreateStatusBar()
   self.SetStatusText("simple browser")
   self.ie = wxIEHtmlWin(self, -1, style = wxNO_FULL_REPAINT_ON_RESIZE)
   self.ie.Navigate("http://www.google.be")

class MyApp(wxApp):
  def OnInit(self):
   frame = MyFrame(NULL,-1,"simple browser")
   frame.Show(true)
   self.SetTopWindow(frame)
   return true

app = MyApp(0)
app.MainLoop()

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

2 things:

Add:
from wxPython.iewin import *

Change (so you can see the consol output:
app = MyApp(0)

···

----- Original Message -----
From: Jonas Geiregat
To: wxPython-users@lists.wxwindows.org
Sent: Friday, April 18, 2003 2:11 AM
Subject: [wxPython-users] simple browser ?

I'm trying to implement wxIEHtmlWin, but it won't work

<-code->

from wxPython.wx import *

class MyFrame(wxFrame):
def __init__(self,parentt,id,title):
  wxFrame.__init__(self,parentt,id,title,wxDefaultPosition,wxSize(800,550))
  self.CreateStatusBar()
  self.SetStatusText("simple browser")
  self.ie = wxIEHtmlWin(self, -1, style = wxNO_FULL_REPAINT_ON_RESIZE)
  self.ie.Navigate("http://www.google.be")

class MyApp(wxApp):
def OnInit(self):
  frame = MyFrame(NULL,-1,"simple browser")
  frame.Show(true)
  self.SetTopWindow(frame)
  return true

app = MyApp()
app.MainLoop()