2005年12月27日 星期二 23:15
比如,把demo\wxIEHtmlWin.py( wxPython.htm只对html支持太简单了)
改造成为一个类似myie的、基于ie内核的多窗口浏览器,因此需要判断网页弹出窗口和用户点击新建的窗口。
网上只看到
self.ie = wxPython.iewin.wxIEHtmlWin(self, -1, style =
wxPython.wx.wxNO_FULL_REPAINT_ON_RESIZE)
wxPython.iewin.EVT_MSHTML_NEWWINDOW2(self, -1, self.OnNewWindow2)
def OnNewWindow2(self, evt):
evt.Veto() # don't allow it
可以阻止打开新的页面。
如果去掉evt.Veto(),会在新的windows os的浏览器(比如ie,而不是self.ie)中打开新连接
但是没找到
1。如何在self.ie中打开新的页面
2。如何区分自动弹出的(广告)页面和这样需要点击才打开的新页面
有谁知道解决方法?多谢
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20051227/9c1fe92a/attachment.html
Zeuux © 2025
京ICP备05028076号