所以我有以下问题:HtmlWindow不能正确显示HTML文件中的图像。将显示一个红色像素化的X,而不是实际图像
这是我的代码:
class OpenMail(Inbox):
def __init__(self, parent, title):
wx.Frame.__init__(self, None, title='Email')
wx.InitAllImageHandlers()
vbox = wx.BoxSizer(wx.HORIZONTAL)
self.SetSizer(vbox)
self.htmlwin = wx.html.HtmlWindow(self, style=wx.html.HW_SCROLLBAR_AUTO)
vbox.Add(self.htmlwin, 1, wx.EXPAND)
def openEmail2(self,x):
self.htmlwin.LoadPage(x)
Html示例:
见:Output images to html using python 我不能说讨论中所说的是否仍然有效,但我没有理由怀疑它。
从那时起,已经添加了支持javascript和css的
wx.html2
或避免
OpenGL
支持,只需正常使用wx.Frame
出于测试目的
d.html
包含链接的html代码: