当前位置: 首页>>代码示例>>Python>>正文


Python wx.html方法代码示例

本文整理汇总了Python中wx.html方法的典型用法代码示例。如果您正苦于以下问题:Python wx.html方法的具体用法?Python wx.html怎么用?Python wx.html使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在wx的用法示例。


在下文中一共展示了wx.html方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: OnHelpCANFestivalMenu

# 需要导入模块: import wx [as 别名]
# 或者: from wx import html [as 别名]
def OnHelpCANFestivalMenu(self, event):
        #self.OpenHtmlFrame("CAN Festival Reference", os.path.join(ScriptDirectory, "doc/canfestival.html"), wx.Size(1000, 600))
        if wx.Platform == '__WXMSW__':
            readerpath = get_acroversion()
            readerexepath = os.path.join(readerpath,"AcroRd32.exe")
            if(os.path.isfile(readerexepath)):
                os.spawnl(os.P_DETACH, readerexepath, "AcroRd32.exe", '"%s"'%os.path.join(ScriptDirectory, "doc","manual_en.pdf"))
            else:
                message = wx.MessageDialog(self, _("Check if Acrobat Reader is correctly installed on your computer"), _("ERROR"), wx.OK|wx.ICON_ERROR)
                message.ShowModal()
                message.Destroy()
        else:
            try:
                os.system("xpdf -remote CANFESTIVAL %s %d &"%(os.path.join(ScriptDirectory, "doc/manual_en.pdf"),16))
            except:
                message = wx.MessageDialog(self, _("Check if xpdf is correctly installed on your computer"), _("ERROR"), wx.OK|wx.ICON_ERROR)
                message.ShowModal()
                message.Destroy() 
开发者ID:jgeisler0303,项目名称:CANFestivino,代码行数:20,代码来源:objdictedit.py

示例2: ResetPage

# 需要导入模块: import wx [as 别名]
# 或者: from wx import html [as 别名]
def ResetPage(self, page):
        topSizer = page.GetSizer()
        sizer = topSizer.GetChildren()[0].GetSizer()
        for w in page.GetChildren():
            sizer.Detach(w)
            if isinstance(w, ParamPage):
                if w.IsShown():
                    w.Hide()
            else:
                w.Destroy()
        topSizer.Remove(sizer)
        # Create new windows
        sizer = wx.BoxSizer(wx.VERTICAL)
        # Special case - resize html window
        if g.conf.panic:
            topSizer.Add(sizer, 1, wx.EXPAND)
        else:
            topSizer.Add(sizer, 0, wx.ALL, 5)
        return sizer 
开发者ID:andreas-p,项目名称:admin4,代码行数:21,代码来源:panel.py

示例3: Go

# 需要导入模块: import wx [as 别名]
# 或者: from wx import html [as 别名]
def Go(self):
      lines=[]
      lines.append("<html><body><table>")
      def add(name, txt):
        val=self.getVal(name)
        if val != "":
          val=val.replace('\n', '<br/>')
          lines.append("<tr><td><b>%s</b></td><td>%s</td></tr>" % (txt, val))

      self.SetTitle(self.logline[0])
      for name in LoggingPage.logColNames:
        ci=LoggingPage.logColInfo.get(name)
        if not ci or (len(ci) > 2 and ci[2]): 
          continue
        add(name, xlt(ci[0]))
      lines.append("</table></body></html>")
      self.browser.SetPage("\n".join(lines))
      self.query=self.getVal('query')
      self.EnableControls("QueryTool", self.query) 
开发者ID:andreas-p,项目名称:admin4,代码行数:21,代码来源:ServerPages.py

示例4: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import html [as 别名]
def __init__(self, *args, **kwds):
        # begin wxGlade: TestPanelWithBasesInFrame.__init__
        kwds["style"] = kwds.get("style", 0)
        TestPanel.__init__(self, *args, **kwds)
        testpanel.TestPanel.__init__(self)

        sizer_1 = wx.BoxSizer(wx.VERTICAL)

        self.notebook_1 = TestNotebookWithBasesInFrame(self, wx.ID_ANY)
        sizer_1.Add(self.notebook_1, 1, wx.EXPAND, 0)

        self.window_1 = SplitterWindowWithBasesInFrame(self, wx.ID_ANY)
        sizer_1.Add(self.window_1, 1, wx.EXPAND, 0)

        self.html = wx.html.HtmlWindow(self, wx.ID_ANY)
        sizer_1.Add(self.html, 1, wx.ALL | wx.EXPAND, 3)

        self.SetSizer(sizer_1)

        self.Layout()
        # end wxGlade

# end of class TestPanelWithBasesInFrame 
开发者ID:wxGlade,项目名称:wxGlade,代码行数:25,代码来源:BasesEtc_Phoenix.py

示例5: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import html [as 别名]
def __init__(self, *args, **kwds):
        # begin wxGlade: TestPanelWithBasesInFrame.__init__
        kwds["style"] = kwds.get("style", 0)
        TestPanel.__init__(self, *args, **kwds)
        testpanel.TestPanel.__init__(self)

        sizer_2 = wx.BoxSizer(wx.VERTICAL)

        self.notebook_1 = TestNotebookWithBasesInFrame(self, wx.ID_ANY)
        sizer_2.Add(self.notebook_1, 1, wx.EXPAND, 0)

        self.window_1 = SplitterWindowWithBasesInFrame(self, wx.ID_ANY)
        sizer_2.Add(self.window_1, 1, wx.EXPAND, 0)

        self.html = wx.html.HtmlWindow(self, wx.ID_ANY)
        sizer_2.Add(self.html, 1, wx.ALL | wx.EXPAND, 3)

        self.SetSizer(sizer_2)

        self.Layout()
        # end wxGlade

# end of class TestPanelWithBasesInFrame 
开发者ID:wxGlade,项目名称:wxGlade,代码行数:25,代码来源:BasesEtc_w_sizers_Phoenix.py

示例6: on_Cancel

# 需要导入模块: import wx [as 别名]
# 或者: from wx import html [as 别名]
def on_Cancel(self, event):

        #----------------------------------------
        #  Event handler for the Cancel button.
        #----------------------------------------
        self.Destroy()

    #   on_Cancel()
    #----------------------------------------------------------------
        
#-----------------------------------------
#  Class for displaying HTML help
#  (now using webbrowser module instead).
#-----------------------------------------        
##class HTML_Help_Window(wx.Frame):
##    def __init__(self, parent, title, html_file):
##        wx.Frame.__init__(self, parent, -1, title,
##                          size=(700,800), pos=(600,50))
##        html = wx.html.HtmlWindow(self)
##        if "gtk2" in wx.PlatformInfo:
##            html.SetStandardFonts()
##
##        html.LoadPage(html_file)

#------------------------------------------------------------- 
开发者ID:peckhams,项目名称:topoflow,代码行数:27,代码来源:Input_Dialog_LAST.py

示例7: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import html [as 别名]
def __init__(
        self,
        parent,
        id=-1,
        pos=wx.DefaultPosition,
        size=wx.DefaultSize,
        style=HW_DEFAULT_STYLE,
        name="htmlWindow"
    ):
        wxHtmlWindow.__init__(self, parent, id, pos, size, style, name)
        self.SetForegroundColour(parent.GetForegroundColour())
        self.SetBackgroundColour(parent.GetBackgroundColour())

        #if wx.html.HW_NO_SELECTION & style:
        #    self.Bind(wx.EVT_MOTION, self.OnIdle)
        #    self.handCursor = wx.StockCursor(wx.CURSOR_HAND)
        #    self.x1, self.y1 = self.GetScrollPixelsPerUnit()
        #    self.isSet = False
        self.Bind(EVT_HTML_LINK_CLICKED, self.OnHtmlLinkClicked) 
开发者ID:EventGhost,项目名称:EventGhost,代码行数:21,代码来源:HtmlWindow.py

示例8: OnSave

# 需要导入模块: import wx [as 别名]
# 或者: from wx import html [as 别名]
def OnSave(self, event):
        dlg = wx.FileDialog(self, "Filename to save as",
            wildcard = "HTML files (*.html)|*.html|All files|*",
            style = wx.SAVE | wx.OVERWRITE_PROMPT)

        if dlg.ShowModal() == wx.ID_OK:
            util.writeToFile(dlg.GetPath(), self.html, self)

        dlg.Destroy() 
开发者ID:trelby,项目名称:trelby,代码行数:11,代码来源:commandsdlg.py

示例9: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import html [as 别名]
def __init__(self, parent):
        wx.Dialog.__init__(self, parent, wx.ID_ANY, "About NodeMCU PyFlasher")
        html = HtmlWindow(self, wx.ID_ANY, size=(420, -1))
        if "gtk2" in wx.PlatformInfo or "gtk3" in wx.PlatformInfo:
            html.SetStandardFonts()
        txt = self.text.format(self._get_bundle_dir(), __version__)
        html.SetPage(txt)
        ir = html.GetInternalRepresentation()
        html.SetSize((ir.GetWidth() + 25, ir.GetHeight() + 25))
        self.SetClientSize(html.GetSize())
        self.CentreOnParent(wx.BOTH) 
开发者ID:marcelstoer,项目名称:nodemcu-pyflasher,代码行数:13,代码来源:About.py

示例10: _get_bundle_dir

# 需要导入模块: import wx [as 别名]
# 或者: from wx import html [as 别名]
def _get_bundle_dir():
        # set by PyInstaller, see http://pyinstaller.readthedocs.io/en/v3.2/runtime-information.html
        if getattr(sys, 'frozen', False):
            # noinspection PyUnresolvedReferences,PyProtectedMember
            return sys._MEIPASS
        else:
            return os.path.dirname(os.path.abspath(__file__)) 
开发者ID:marcelstoer,项目名称:nodemcu-pyflasher,代码行数:9,代码来源:About.py

示例11: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import html [as 别名]
def __init__(self, parent, id_):
        super(SCTPanel, self).__init__(parent=parent, id=id_)

        # Logo
        self.img_logo = self.get_logo()
        self.sizer_logo_sct = wx.BoxSizer(wx.VERTICAL)
        self.sizer_logo_sct.Add(self.img_logo, 0, wx.ALL, 5)

        # Citation
        txt_sct_citation = wx.VSCROLL | \
                           wx.HSCROLL | wx.TE_READONLY | \
                           wx.BORDER_SIMPLE
        html_sct_citation = html.HtmlWindow(self, wx.ID_ANY,
                                            size=(280, 115),
                                            style=txt_sct_citation)
        html_sct_citation.SetPage(self.DESCRIPTION_SCT)
        self.sizer_logo_sct.Add(html_sct_citation, 0, wx.ALL, 5)

        # Help button
        button_help = wx.Button(self, id=id_, label="Help")
        button_help.Bind(wx.EVT_BUTTON, self.tutorial)
        self.sizer_logo_sct.Add(button_help, 0, wx.ALL, 5)

        # Get function-specific description
        self.html_desc = self.get_description()

        # Organize boxes
        self.sizer_logo_text = wx.BoxSizer(wx.HORIZONTAL)  # create main box
        self.sizer_logo_text.Add(self.sizer_logo_sct, 0, wx.ALL, 5)
        # TODO: increase the width of the description box
        self.sizer_logo_text.Add(self.html_desc, 0, wx.ALL, 5)

        self.sizer_h = wx.BoxSizer(wx.HORIZONTAL)
        self.sizer_h.Add(self.sizer_logo_text) 
开发者ID:neuropoly,项目名称:spinalcordtoolbox,代码行数:36,代码来源:sct_plugin.py

示例12: get_description

# 需要导入模块: import wx [as 别名]
# 或者: from wx import html [as 别名]
def get_description(self):
        txt_style = wx.VSCROLL | \
                    wx.HSCROLL | wx.TE_READONLY | \
                    wx.BORDER_SIMPLE
        htmlw = html.HtmlWindow(self, wx.ID_ANY,
                                size=(280, 208),
                                style=txt_style)
        htmlw.SetPage(self.DESCRIPTION)
        return htmlw 
开发者ID:neuropoly,项目名称:spinalcordtoolbox,代码行数:11,代码来源:sct_plugin.py

示例13: _HTMLize

# 需要导入模块: import wx [as 别名]
# 或者: from wx import html [as 别名]
def _HTMLize(self, title, author, date, text):
        title = title or '(no title)'
        author = author or '(no author)'
        date = date or '(no date)'
        paragraphs = ''.join(['<p align="justify">' + x + '</p>\n'
                              for x in text.split('\n')])
        return (f'<html><body>'
                f'<h2>{title}</h2>'
                f'<p><i>by <b>{author}</b>, on <b>{date}</b></i></p>'
                f'{paragraphs}'
                f'</body></html>') 
开发者ID:cmpilato,项目名称:thotkeeper,代码行数:13,代码来源:app.py

示例14: CreateHTMLCtrl

# 需要导入模块: import wx [as 别名]
# 或者: from wx import html [as 别名]
def CreateHTMLCtrl(self):
        ctrl = wx.html.HtmlWindow(self, -1, wx.DefaultPosition, wx.Size(400, 300))
        if "gtk2" in wx.PlatformInfo or "gtk3" in wx.PlatformInfo:
            ctrl.SetStandardFonts()

        ctrl.SetPage("")

        return ctrl 
开发者ID:xmendez,项目名称:wfuzz,代码行数:10,代码来源:guicontrols.py

示例15: Bind

# 需要导入模块: import wx [as 别名]
# 或者: from wx import html [as 别名]
def Bind(self, event, handler, source=None, id=wx.ID_ANY, id2=wx.ID_ANY):
            if event == HtmlWindowUrlClick:
                self.Connect(-1, -1, EVT_HTML_URL_CLICK, handler)
            else:
                wx.html.HtmlWindow.Bind(event, handler, source=source, id=id, id2=id2)
    
#-------------------------------------------------------------------------------
#                                Html Frame
#------------------------------------------------------------------------------- 
开发者ID:jgeisler0303,项目名称:CANFestivino,代码行数:11,代码来源:objdictedit.py


注:本文中的wx.html方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。