def __init__(self, parent, Size, title, mode, data): wx.Frame.__init__(self, parent, wx.ID_ANY, title, size=Size) html = wx.html.HtmlWindow(self) self.error = None self.code = 0 # if “gtk2″ in wx.PlatformInfo: # html.SetStandardFonts() ret = None if mode == 'code': ret = html.SetPage(data) elif mode == 'url': ret = html.LoadPage(data) elif mode == 'frontcode': html.Bind(wx.html.EVT_HTML_LINK_CLICKED, self.OnURLClick) ret = html.SetPage(data) if ret is True: self.Show() elif ret is False: self.code = -1 if ret == None: self.error = 'Invalid mode b' elif ret is False: self.error = 'Error loading page'
def OnHelp(self, event): print("showing help") dlg = HelpBox(None) html = dlg.m_htmlWin1 name = 'help.html' html.LoadPage(name) dlg.Show()
def __init__(self, parent, id): wx.Frame.__init__(self, parent, id, size=(800,600)) html = wx.html.HtmlWindow(self) if "gtk2" in wx.PlatformInfo: html.SetStandardFonts() html.LoadPage("http://localhost/index.html")
def __init__(self, parent, HTML): wx.Frame.__init__(self, parent, wx.ID_ANY, title="Help Window", size=(800, 600)) html = HtmlWindow(self) html.LoadPage(HTML)
def __init__(self, parent, title): wx.Frame.__init__(self, parent, -1, title, size=(600, 400)) html = wx.html.HtmlWindow(self) if "gtk2" in wx.PlatformInfo: html.SetStandardFonts() dlg = wx.TextEntryDialog(self, "Enter a URL", "HTMLWindow") if dlg.ShowModal() == wx.ID_OK: html.LoadPage(dlg.GetValue())
def __init__(self, parent, config): wx.Dialog.__init__(self, parent, -1, 'About EvilScribe version ' + config.app_version) html = wx.html.HtmlWindow(self, -1, size=(640, -1)) html.LoadPage('http://www.evilscribe.net') ir = html.GetInternalRepresentation() html.SetSize((ir.GetWidth()+24, ir.GetHeight()+25)) self.SetClientSize(html.GetSize()) self.CentreOnParent(wx.BOTH)
def __init__(self, parent): wx.Frame.__init__(self, parent, wx.ID_ANY, title=APP_TITLE + ' Documentation', size=(800, 500)) html = wxHTML(self) html.SetStandardFonts() about = 'res' + str(os.path.sep) + 'documentation.html' html.LoadPage(os.path.join(config.basedir, about))
def __init__(self, parent): wx.Frame.__init__(self, parent, wx.ID_ANY, title='About ' + APP_TITLE, size=(400, 500)) html = wxHTML(self) html.SetStandardFonts() about = 'res' + str(os.path.sep) + 'about.html' html.LoadPage(os.path.join(config.basedir, about))
def __init__(self, parent): wx.Dialog.__init__(self, parent, -1, 'About ICESym-GUI', size=(450, 350) ) html = wx.html.HtmlWindow(self) html.LoadPage('html/about.html') button = wx.Button(self, wx.ID_OK, "Close") sizer = wx.BoxSizer(wx.VERTICAL) sizer.Add(html, 1, wx.EXPAND|wx.ALL, 5) sizer.Add(button, 0, wx.ALIGN_CENTER|wx.ALL, 5) self.SetSizer(sizer) self.Layout()
def __init__(self, parent, filepath): wx.Frame.__init__(self, parent, -1, "HTML Viewer", size=(800, 600)) # Open a new HtmlWindow that is capable of rendering such content html = wx.html.HtmlWindow(self) self.Maximize(True) if "gtk2" in wx.PlatformInfo: html.SetStandardFonts() # Load the selected file in the viewer ! html.LoadPage(filepath)
def __init__(self, parent=None): """Read and render the HTML help file.""" wx.Frame.__init__(self, parent, -1, 'Test', size=(800, 600)) html = HtmlWindow(self) html.LoadPage('help.html')
def __init__(self, parent, title, html_str=''): wx.Frame.__init__(self, parent, -1, title, size=(700,900)) html = wx.html.HtmlWindow(self) html.LoadPage(html_str)
def OnHelp(self, event): dlg = HelpBox(None) html = dlg.m_htmlWin1 name = 'Manual.html' html.LoadPage(name) dlg.Show()