2024-04-29 12:15:47 发布
网友
我开始学习Python和wxPython,作为我正在做的应用程序的一部分,我需要在我的应用程序的左窗格上有一个简单的浏览器。我在想我该怎么做?或者至少给我指出正确的方向,这将有助于我做更多的事情。提前谢谢!
编辑: 一个次要的问题,我需要学习多少知识?我应该使用像wxGlade这样的工具吗?
wx.html.htmlwindows示例
import wx import wx.html class MyHtmlFrame(wx.Frame): def __init__(self, parent, title): wx.Frame.__init__(self, parent, -1, title, size=(600,400)) html = wx.html.HtmlWindow(self) wx.CallAfter(html.LoadPage, "http://www.google.com") app = wx.PySimpleApp() frm = MyHtmlFrame(None, "Simple HTML Browser") frm.Show() app.MainLoop()
wx.HtmlWindowwx.HtmlWindow is capable of parsing and rendering most simple HTML tags. It is not intended to be a high-end HTML browser. If you're looking for something like that see the IEHtmlWin class, which wraps the core MSIE HTML viewer.
wx.HtmlWindow
wx.HtmlWindow is capable of parsing and rendering most simple HTML tags.
It is not intended to be a high-end HTML browser. If you're looking for something like that see the IEHtmlWin class, which wraps the core MSIE HTML viewer.
我认为GenericDirCtrl小部件可能对您有用。This tutorial有很多例子,其中包括在完整脚本(下面粘贴的屏幕截图)中简单使用该小部件。我强烈建议不要从wxGlade开始,而是手动布局前几个wxgui(使用适当的大小)。你会从中学到很多。
您可以看看wxPython示例,它们还包括wxPython支持的几乎所有小部件的代码示例。如果使用Windows,可以在WxPython的“开始”菜单文件夹中找到它们。
wx.html.htmlwindows示例
我认为GenericDirCtrl小部件可能对您有用。This tutorial有很多例子,其中包括在完整脚本(下面粘贴的屏幕截图)中简单使用该小部件。我强烈建议不要从wxGlade开始,而是手动布局前几个wxgui(使用适当的大小)。你会从中学到很多。
您可以看看wxPython示例,它们还包括wxPython支持的几乎所有小部件的代码示例。如果使用Windows,可以在WxPython的“开始”菜单文件夹中找到它们。
相关问题 更多 >
编程相关推荐