|
python中,wx.lib.iewin获取了远程页面,
当点击了页面中的链接后,
会不会有事件的信号产生,
因为我需要在URL改变后相应地改变窗口大小。
# -*- coding:utf-8 -*-
import wx
import wx.lib.iewin as iewin
class MyApp(wx.App):
def OnInit(self):
self.frame = wx.Frame(None)
self.panel=wx.Panel(self.frame)
self.htmlctrl = iewin.IEHtmlWindow(self.panel,size=(304,202))
self.htmlctrl.LoadUrl("http://www.53kf.com/login.htm")
self.SetTopWindow(self.frame)
self.frame.Show()
self.Bind(URL改变后的事件,self.OnSizeChange,self.panel)
return True
def OnSizeChange(self,event):
wx.MessageBox('size changed','wx.lib.iewin')
app = MyApp(0)
app.MainLoop() |
|