當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。