def __init__(self, parent, fsm_path=None): wx.Panel.__init__(self, parent, style=wx.TAB_TRAVERSAL | wx.CLIP_CHILDREN | wx.NO_FULL_REPAINT_ON_RESIZE) self.fsm_path = fsm_path global fsm_count preview_filename = format.mangle_path( str("outgui:images/temp/fsm" + str(fsm_count))) self.dot_path = preview_filename + ".dot" self.image_path = preview_filename + ".gif" self.map_path = preview_filename + ".map" self.html_path = preview_filename + ".html" fsm_count += 1 self.ie = iewin.IEHtmlWindow(self, -1, style=wx.NO_FULL_REPAINT_ON_RESIZE) sizer = wx.BoxSizer(wx.VERTICAL) sizer.Add(self.ie, 1, wx.EXPAND) self.SetSizer(sizer) self.Bind(iewin.EVT_BeforeNavigate2, self.__on_before_navigate, self.ie)
def __init__(self, parent, divsTree, shapeEditor): wx.Panel.__init__(self, parent, size=(1, 1)) sizer = wx.BoxSizer(wx.VERTICAL) self.browser = iewin.IEHtmlWindow(self) sizer.Add(self.browser, 1, wx.EXPAND, 10) self.SetSizer(sizer) self.divsTree = divsTree self.shapeEditor = shapeEditor
def __init__(self, parent): wx.Panel.__init__(self, parent) ##super(MyBrowser,self).__init__(self,parent) sizer = wx.BoxSizer(wx.VERTICAL) self.browser = iewin.IEHtmlWindow(self) sizer.Add(self.browser, 1, wx.ALL | wx.EXPAND) self.SetSizer(sizer) x = wx.EXPAND self.SetSize(parent.Size)
def addHTMLWindow(self): try: from wx.lib import iewin self.htmlWin = iewin.IEHtmlWindow(self.m_container, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize) self.previewPane.Add(self.htmlWin, proportion=1, flag=wx.EXPAND) self.loadHTML() self.previewPane.Layout() except: self.popup("htmlerror") self.Destroy()
def __init__(self, parent): wx.Panel.__init__( self, parent, -1, style=wx.TAB_TRAVERSAL|wx.CLIP_CHILDREN|wx.NO_FULL_REPAINT_ON_RESIZE ) self.ie = iewin.IEHtmlWindow(self) sizer = wx.BoxSizer(wx.VERTICAL) sizer.Add(self.ie, 1, wx.EXPAND) # Since this is a wx.Window we have to call Layout ourselves self.Bind(wx.EVT_SIZE, self.OnSize) self.SetSizer(sizer) ## Hook up the event handlers for the IE window. self.ie.AddEventSink(self)
def __init__(self, title="Micro App"): wx.Frame.__init__(self, None , -1, title) btn = wx.Button(self, label="Get HTML") btn.Bind(wx.EVT_BUTTON, self.GetHTML) self.Bind(wx.EVT_CLOSE, self.GetHTML) self.htwin = iewin.IEHtmlWindow(self) self.htwin.Navigate('http://cameochemicals.noaa.gov/') S = wx.BoxSizer(wx.VERTICAL) S.Add(btn, 0, wx.ALL, 5) S.Add(self.htwin, 1, wx.EXPAND) self.SetSizer(S) self.SetSize((700, 500)) self.Bind(wx.EVT_CLOSE, self.OnQuit)
def __init__(self,parent=None, title=u'打印发货单',trade_ids=[]): wx.Frame.__init__(self, parent, wx.ID_ANY, title, size=(850,500)) self.trade_ids = trade_ids self.trade_user_code = self.getTradeUserCode(trade_ids) self.panel = wx.Panel(self, wx.ID_ANY) self.printer = HtmlPrinter(name=u'打印', parentWindow=None) self.printed = False self.html = iewin.IEHtmlWindow(self.panel,-1) #trade_ids = [200165044022938,165155430754126] if self.isAsyncPDFPrint(): if self.printPromptOk(): self.html.LoadUrl(self.getAsyncPDFPrintUrl(self.trade_user_code, trade_ids)) else: self.Close() else: html_text = self.createHtml(trade_ids) #self.saveHtml2File(html_text,len(trade_ids)) self.html.LoadString(html_text) previewBtn = wx.Button(self.panel,wx.ID_ANY,u'打印预览') #printBtn = wx.Button(self.panel,wx.ID_ANY,u'打印') cancelBtn = wx.Button(self.panel, wx.ID_ANY, u'关闭窗口') self.Bind(wx.EVT_BUTTON, self.onPreview, previewBtn) #self.Bind(wx.EVT_BUTTON, self.onPrint, printBtn) self.Bind(wx.EVT_BUTTON, self.onCancel, cancelBtn) sizer = wx.BoxSizer(wx.VERTICAL) btnSizer = wx.BoxSizer(wx.HORIZONTAL) sizer.Add(self.html, 1, wx.GROW) btnSizer.Add(previewBtn, 0, wx.ALL|wx.CENTER, 5) #btnSizer.Add(printBtn, 0, wx.ALL|wx.CENTER, 5) btnSizer.Add(cancelBtn, 0, wx.ALL|wx.CENTER, 5) sizer.Add(btnSizer,0,wx.ALL|wx.CENTER,5) self.panel.SetSizer(sizer) self.panel.SetAutoLayout(True)
def __init__(self, parent): wx.aui.AuiMDIChildFrame.__init__(self, parent, -1, title=u"地图显示 ") self.parent = parent self.ie = iewin.IEHtmlWindow(self, -1, style=wx.NO_FULL_REPAINT_ON_RESIZE) self.Bind(wx.EVT_WINDOW_DESTROY, self.OnClose) URL = "http://localhost:8080/MapTest/map.jsp" # self.ie.Navigate(URL) self.box = wx.BoxSizer(wx.VERTICAL) self.box.Add(self.ie, 1, wx.GROW) # self.ie.LoadUrl(URL) self.ie.Navigate(URL) self.SetSizer(self.box) self.SetAutoLayout(True)
def __init__(self, parent=None, title=u'打印快递单', trade_ids=[]): wx.Frame.__init__(self, parent, wx.ID_ANY, title, size=(850, 500)) self.trade_ids = trade_ids self.panel = wx.Panel(self, wx.ID_ANY) self.printed = False # self.printer = HtmlPrinter(name=u'打印', parentWindow=self) self.html = iewin.IEHtmlWindow(self.panel, -1) # trade_ids = [200165044022938,165155430754126] html_text = self.createHtml(trade_ids) # self.saveHtml2File(html_text,len(trade_ids)) # self.printer.PreviewText(html_text, u'物流单') self.html.LoadString(html_text) previewBtn = wx.Button(self.panel, wx.ID_ANY, u'打印预览') cancelBtn = wx.Button(self.panel, wx.ID_ANY, u'关闭窗口') self.Bind(wx.EVT_BUTTON, self.onPreview, previewBtn) self.Bind(wx.EVT_BUTTON, self.onCancel, cancelBtn) # 监听打印预览菜单项 # self.panel.Bind(wx.EVT_MENU, self.onSelectMenu) sizer = wx.BoxSizer(wx.VERTICAL) btnSizer = wx.BoxSizer(wx.HORIZONTAL) sizer.Add(self.html, 1, wx.GROW) btnSizer.Add(previewBtn, 0, wx.ALL | wx.CENTER, 5) btnSizer.Add(cancelBtn, 0, wx.ALL | wx.CENTER, 5) sizer.Add(btnSizer, 0, wx.ALL | wx.CENTER, 5) self.panel.SetSizer(sizer) self.panel.SetAutoLayout(True)
def __init__(self, parent, log, frame=None): wx.Panel.__init__(self, parent, -1, style=wx.TAB_TRAVERSAL | wx.CLIP_CHILDREN | wx.NO_FULL_REPAINT_ON_RESIZE) self.log = log self.current = "http://wxPython.org/" self.frame = frame if frame: self.titleBase = frame.GetTitle() sizer = wx.BoxSizer(wx.VERTICAL) btnSizer = wx.BoxSizer(wx.HORIZONTAL) self.ie = iewin.IEHtmlWindow(self) btn = wx.Button(self, -1, "Open", style=wx.BU_EXACTFIT) self.Bind(wx.EVT_BUTTON, self.OnOpenButton, btn) btnSizer.Add(btn, 0, wx.EXPAND | wx.ALL, 2) btn = wx.Button(self, -1, "Home", style=wx.BU_EXACTFIT) self.Bind(wx.EVT_BUTTON, self.OnHomeButton, btn) btnSizer.Add(btn, 0, wx.EXPAND | wx.ALL, 2) btn = wx.Button(self, -1, "<--", style=wx.BU_EXACTFIT) self.Bind(wx.EVT_BUTTON, self.OnPrevPageButton, btn) btnSizer.Add(btn, 0, wx.EXPAND | wx.ALL, 2) self.Bind(wx.EVT_UPDATE_UI, self.OnCheckCanGoBack, btn) btn = wx.Button(self, -1, "-->", style=wx.BU_EXACTFIT) self.Bind(wx.EVT_BUTTON, self.OnNextPageButton, btn) btnSizer.Add(btn, 0, wx.EXPAND | wx.ALL, 2) self.Bind(wx.EVT_UPDATE_UI, self.OnCheckCanGoForward, btn) btn = wx.Button(self, -1, "Stop", style=wx.BU_EXACTFIT) self.Bind(wx.EVT_BUTTON, self.OnStopButton, btn) btnSizer.Add(btn, 0, wx.EXPAND | wx.ALL, 2) btn = wx.Button(self, -1, "Search", style=wx.BU_EXACTFIT) self.Bind(wx.EVT_BUTTON, self.OnSearchPageButton, btn) btnSizer.Add(btn, 0, wx.EXPAND | wx.ALL, 2) btn = wx.Button(self, -1, "Refresh", style=wx.BU_EXACTFIT) self.Bind(wx.EVT_BUTTON, self.OnRefreshPageButton, btn) btnSizer.Add(btn, 0, wx.EXPAND | wx.ALL, 2) txt = wx.StaticText(self, -1, "Location:") btnSizer.Add(txt, 0, wx.CENTER | wx.ALL, 2) self.location = wx.ComboBox(self, -1, "", style=wx.CB_DROPDOWN | wx.PROCESS_ENTER) self.Bind(wx.EVT_COMBOBOX, self.OnLocationSelect, self.location) self.location.Bind(wx.EVT_KEY_UP, self.OnLocationKey) self.location.Bind(wx.EVT_CHAR, self.IgnoreReturn) btnSizer.Add(self.location, 1, wx.EXPAND | wx.ALL, 2) sizer.Add(btnSizer, 0, wx.EXPAND) sizer.Add(self.ie, 1, wx.EXPAND) self.ie.LoadUrl(self.current) self.location.Append(self.current) self.SetSizer(sizer) # Since this is a wx.Window we have to call Layout ourselves self.Bind(wx.EVT_SIZE, self.OnSize) ## Hook up the event handlers for the IE window. Using ## AddEventSink is how we tell the COM system to look in this ## object for method names matching the COM Event names. They ## are automatically looked for in the ActiveXCtrl class, (so ## deriving a new class from IEHtmlWindow would also have been ## a good appraoch) and now they will be looked for here too. self.ie.AddEventSink(self)
def __init__(self, parent, log, frame=None, htmlfile=None): wx.Panel.__init__( self, parent, -1, style=wx.TAB_TRAVERSAL|wx.CLIP_CHILDREN|wx.NO_FULL_REPAINT_ON_RESIZE ) self.log = log if htmlfile != None: #print htmlfile self.current = htmlfile else: self.current = "about:blank" self.frame = frame if frame: self.titleBase = frame.GetTitle() sizer = wx.BoxSizer(wx.VERTICAL) btnSizer = wx.BoxSizer(wx.HORIZONTAL) self.ie = iewin.IEHtmlWindow(self, -1, style = wx.NO_FULL_REPAINT_ON_RESIZE) #btn = wx.Button(self, -1, "Open", style=wx.BU_EXACTFIT) #self.Bind(wx.EVT_BUTTON, self.OnOpenButton, btn) #btnSizer.Add(btn, 0, wx.EXPAND|wx.ALL, 2) #btn = wx.Button(self, -1, "Home", style=wx.BU_EXACTFIT) #self.Bind(wx.EVT_BUTTON, self.OnHomeButton, btn) #btnSizer.Add(btn, 0, wx.EXPAND|wx.ALL, 2) btn = wx.Button(self, -1, "<--", style=wx.BU_EXACTFIT) self.Bind(wx.EVT_BUTTON, self.OnPrevPageButton, btn) btnSizer.Add(btn, 0, wx.EXPAND|wx.ALL, 2) btn = wx.Button(self, -1, "-->", style=wx.BU_EXACTFIT) self.Bind(wx.EVT_BUTTON, self.OnNextPageButton, btn) btnSizer.Add(btn, 0, wx.EXPAND|wx.ALL, 2) btn = wx.Button(self, -1, "Stop", style=wx.BU_EXACTFIT) self.Bind(wx.EVT_BUTTON, self.OnStopButton, btn) btnSizer.Add(btn, 0, wx.EXPAND|wx.ALL, 2) #btn = wx.Button(self, -1, "Search", style=wx.BU_EXACTFIT) #self.Bind(wx.EVT_BUTTON, self.OnSearchPageButton, btn) #btnSizer.Add(btn, 0, wx.EXPAND|wx.ALL, 2) btn = wx.Button(self, -1, "Refresh", style=wx.BU_EXACTFIT) self.Bind(wx.EVT_BUTTON, self.OnRefreshPageButton, btn) btnSizer.Add(btn, 0, wx.EXPAND|wx.ALL, 2) txt = wx.StaticText(self, -1, "Location:") btnSizer.Add(txt, 0, wx.CENTER|wx.ALL, 2) self.location = wx.ComboBox( self, -1, "", style=wx.CB_DROPDOWN|wx.PROCESS_ENTER ) self.Bind(wx.EVT_COMBOBOX, self.OnLocationSelect, self.location) self.location.Bind(wx.EVT_KEY_UP, self.OnLocationKey) self.location.Bind(wx.EVT_CHAR, self.IgnoreReturn) btnSizer.Add(self.location, 1, wx.EXPAND|wx.ALL, 2) sizer.Add(btnSizer, 0, wx.EXPAND) sizer.Add(self.ie, 1, wx.EXPAND) self.ie.LoadUrl(self.current) self.location.Append(self.current) self.SetSizer(sizer) # Since this is a wxWindow we have to call Layout ourselves self.Bind(wx.EVT_SIZE, self.OnSize) # Hook up the event handlers for the IE window self.Bind(iewin.EVT_BeforeNavigate2, self.OnBeforeNavigate2, self.ie) self.Bind(iewin.EVT_NewWindow2, self.OnNewWindow2, self.ie) self.Bind(iewin.EVT_DocumentComplete, self.OnDocumentComplete, self.ie)
def __init__(self, parent, frame=None): wx.Panel.__init__( self, parent, -1, style=wx.TAB_TRAVERSAL|wx.CLIP_CHILDREN|wx.NO_FULL_REPAINT_ON_RESIZE ) self.homeUrl = "http://www.google.cn/" if frame == None : self.frame = parent else : self.frame = frame sizer = wx.BoxSizer(wx.VERTICAL) btnSizer = wx.BoxSizer(wx.HORIZONTAL) #self.titleBase = frame.GetTitle() tsize = (24,24) tb = wx.ToolBar(self, -1, wx.DefaultPosition, wx.DefaultSize, wx.TB_FLAT | wx.TB_NODIVIDER | wx.TB_HORZ_TEXT) tb.SetToolBitmapSize(tsize) #folder = Home.GetBitmap() #tbtn = platebtn.PlateButton(tb, wx.ID_ANY, u' 连接 ', glob.getBitmap('connect'), style = platebtn.PB_STYLE_SQUARE) #menu = wx.Menu() #menu.Append(wx.NewId(), u"上线") #menu.Append(wx.NewId(), u"离线") #tbtn.SetMenu(menu) #tb.AddControl(menu) tb.AddLabelTool(self.ID_BACK, u"后退", glob.getBitmap('back'), shortHelp="Go Back", longHelp="Go Back") self.Bind(wx.EVT_TOOL, self.OnPrevPageButton, id = self.ID_BACK) tb.AddLabelTool(self.ID_FORWARD, u"前进", glob.getBitmap('forward'), shortHelp="Go Forward") self.Bind(wx.EVT_TOOL, self.OnNextPageButton, id = self.ID_FORWARD) tb.AddSeparator() tb.AddLabelTool(self.ID_REFRESH, u"刷新", glob.getBitmap('refresh'), shortHelp="Go Forward") self.Bind(wx.EVT_TOOL, self.OnRefreshPageButton, id = self.ID_REFRESH) tb.AddLabelTool(self.ID_STOP, u"停止", glob.getBitmap('stop'), shortHelp="Go Forward") self.Bind(wx.EVT_TOOL, self.OnStopButton, id = self.ID_STOP) tb.AddSeparator() tb.AddLabelTool(self.ID_CONNECT, u"连接", glob.getBitmap('connect'), shortHelp="Go Forward") self.Bind(wx.EVT_TOOL, self.OnConnectButton, id = self.ID_CONNECT) tb.AddSeparator() tb.AddLabelTool(self.ID_HOME, u"主页", glob.getBitmap('home'), shortHelp="Go Home") self.Bind(wx.EVT_TOOL, self.OnHomeButton, id = self.ID_HOME) tb.AddSeparator() self.location = wx.ComboBox(tb, -1, "", style=wx.CB_DROPDOWN|wx.PROCESS_ENTER) self.Bind(wx.EVT_COMBOBOX, self.OnLocationSelect, self.location) self.location.Bind(wx.EVT_KEY_UP, self.OnLocationKey) self.location.Bind(wx.EVT_CHAR, self.IgnoreReturn) tb.AddControl(self.location) tb.Realize() self._toolBar = tb sizer.Add(self._toolBar, 0, wx.ALIGN_TOP | wx.EXPAND | wx.ALL, 2) #self._mgr.AddPane(tb, wx.aui.AuiPaneInfo().Name("toolbar").ToolbarPane().Top(). # Gripper(False).LeftDockable(False).RightDockable(False)) self.ie = iewin.IEHtmlWindow(self) sizer.Add(self.ie, 1, wx.EXPAND) self.ie.AddressBar = True self.SetSizer(sizer) ''' #btn = wx.Button(self, -1, "Search", style=wx.BU_EXACTFIT) #self.Bind(wx.EVT_BUTTON, self.OnSearchPageButton, btn) #btnSizer.Add(btn, 0, wx.EXPAND|wx.ALL, 2) self._mgr.AddPane(self.ie, wx.aui.AuiPaneInfo().Name("grid_content").CenterPane()) self._mgr.Update() ''' self.toUrl = None self.ie.LoadUrl(self.homeUrl) self.location.Append(self.homeUrl) self.Bind(wx.EVT_SIZE, self.OnSize) self.Bind(wx.EVT_IDLE, self.OnIdle) self.ie.AddEventSink(self)
def __init__(self, parent, filename=''): HtmlWindowBase.__init__(self, parent, filename) self.ie = iewin.IEHtmlWindow(parent, -1, style=wx.NO_FULL_REPAINT_ON_RESIZE)
def __init__(self, parent, prefix, sufix, query, home): childDialogGUI.__init__(self, "Help Browser", parent) self.home = home self.prefix = prefix self.sufix = sufix self.query = query self.parent = parent if parent: self.titleBase = "Conjurer GUI" # Creating Boxer sizer = wx.BoxSizer(wx.VERTICAL) btnSizer = wx.BoxSizer(wx.HORIZONTAL) self.ie = iewin.IEHtmlWindow(self, -1, style=wx.NO_FULL_REPAINT_ON_RESIZE) btn = wx.Button(self, -1, "Home", style=wx.BU_EXACTFIT) self.Bind(wx.EVT_BUTTON, self.OnHomeButton, btn) btnSizer.Add(btn, 0, wx.EXPAND | wx.ALL, 2) btn = wx.Button(self, -1, "<--", style=wx.BU_EXACTFIT) self.Bind(wx.EVT_BUTTON, self.OnPrevPageButton, btn) btnSizer.Add(btn, 0, wx.EXPAND | wx.ALL, 2) btn = wx.Button(self, -1, "-->", style=wx.BU_EXACTFIT) self.Bind(wx.EVT_BUTTON, self.OnNextPageButton, btn) btnSizer.Add(btn, 0, wx.EXPAND | wx.ALL, 2) btn = wx.Button(self, -1, "Stop", style=wx.BU_EXACTFIT) self.Bind(wx.EVT_BUTTON, self.OnStopButton, btn) btnSizer.Add(btn, 0, wx.EXPAND | wx.ALL, 2) btn = wx.Button(self, -1, "Refresh", style=wx.BU_EXACTFIT) self.Bind(wx.EVT_BUTTON, self.OnRefreshPageButton, btn) btnSizer.Add(btn, 0, wx.EXPAND | wx.ALL, 2) txt = wx.StaticText(self, -1, "Location:") btnSizer.Add(txt, 0, wx.CENTER | wx.ALL, 2) self.location = wx.ComboBox(self, -1, "", style=wx.CB_DROPDOWN | wx.PROCESS_ENTER) self.Bind(wx.EVT_COMBOBOX, self.OnLocationSelect, self.location) self.location.Bind(wx.EVT_KEY_UP, self.OnLocationKey) self.location.Bind(wx.EVT_CHAR, self.IgnoreReturn) btnSizer.Add(self.location, 1, wx.EXPAND | wx.ALL, 2) txt = wx.StaticText(self, -1, "Search:") btnSizer.Add(txt, 0, wx.CENTER | wx.ALL, 2) self.search = wx.ComboBox(self, -1, "", style=wx.CB_DROPDOWN | wx.PROCESS_ENTER) self.Bind(wx.EVT_COMBOBOX, self.OnSearchSelect, self.search) self.search.Bind(wx.EVT_KEY_UP, self.OnSearchKey) self.search.Bind(wx.EVT_CHAR, self.IgnoreReturn) btnSizer.Add(self.search, 1, wx.EXPAND | wx.ALL, 2) sizer.Add(btnSizer, 0, wx.EXPAND) sizer.Add(self.ie, 1, wx.EXPAND) self.current = self.prefix + self.query + self.sufix self.ie.LoadUrl(self.current) self.location.Append(self.current) # Setting this window main sizer self.SetSizer(sizer) # Since this is a wxWindow we have to call Layout ourselves self.Bind(wx.EVT_SIZE, self.OnSize) # Hook up the event handlers for the IE window self.Bind(iewin.EVT_DocumentComplete, self.OnDocumentComplete, self.ie) self.Bind(iewin.EVT_StatusTextChange, self.OnStatusTextChange, self.ie) self.Bind(iewin.EVT_TitleChange, self.OnTitleChange, self.ie) # self.tree.SetSelectionChangedCallback(self.OnNOHSelectionChanged) self.Bind(wx.EVT_CLOSE, self.OnCloseWindow)
def populate(self): sizer = wx.BoxSizer(wx.VERTICAL) # # Create the button bar # bsizer = wx.BoxSizer(wx.HORIZONTAL) self.back_button = self.add_button("Back", self.OnBack, bsizer) self.forward_button = self.add_button("Forward", self.OnForward, bsizer) if sys.platform == Platform.WIN: self.home_button = self.add_button("Home", self.OnHome, bsizer) self.stop_button = self.add_button("Stop", self.OnStop, bsizer) self.refresh_button = self.add_button("Refresh", self.OnRefresh, bsizer) t = wx.StaticText(self, -1, "Location: ") bsizer.Add(t, 0, wx.EXPAND) self.location = wx.ComboBox(self, wx.NewId(), "", style=wx.CB_DROPDOWN | wx.PROCESS_ENTER) wx.EVT_COMBOBOX(self, self.location.GetId(), self.OnLocationSelect) wx.EVT_KEY_UP(self.location, self.OnLocationKey) wx.EVT_CHAR(self.location, self.IgnoreReturn) bsizer.Add(self.location, 1, wx.EXPAND) sizer.Add(bsizer, 0, wx.EXPAND) # # Now we can set up the browser widget # if sys.platform == Platform.WIN: self.wxbrowser = iewin.IEHtmlWindow( self, -1, style=wx.NO_FULL_REPAINT_ON_RESIZE) sizer.Add(self.wxbrowser, 1, wx.EXPAND) # Hook up the event handlers for the IE window iewin.EVT_BeforeNavigate2(self, -1, self.OnBeforeNavigate2) iewin.EVT_NewWindow2(self, -1, self.OnNewWindow2) iewin.EVT_DocumentComplete(self, -1, self.OnDocumentComplete) # wx.EVT_MSHTML_STATUSTEXTCHANGE(self, -1, self.OnStatusTextChange) iewin.EVT_TitleChange(self, -1, self.OnTitleChange) else: self.wxbrowser = wxMozillaBrowser( self, -1, style=wx.NO_FULL_REPAINT_ON_RESIZE) sizer.Add(self.wxbrowser, 1, wx.EXPAND) # Hook up the event handlers for the Mozilla window wx.EVT_MOZILLA_BEFORE_LOAD(self, -1, self.OnBeforeLoad) wx.EVT_MOZILLA_URL_CHANGED(self, -1, self.UpdateURL) wx.EVT_MOZILLA_LOAD_COMPLETE(self, -1, self.OnLoadComplete) wx.EVT_MOZILLA_STATUS_CHANGED(self, -1, self.UpdateStatus) wx.EVT_MOZILLA_STATE_CHANGED(self, -1, self.UpdateState) self.SetSizer(sizer) self.SetAutoLayout(1) self.Layout()