X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/65dd82cbcef74ea4514a7cc1407695cf9b4dba98..c5145d41777d5c47a0d82120d1d99a6cb66e91c7:/utils/wxPython/demo/wxHtmlWindow.py diff --git a/utils/wxPython/demo/wxHtmlWindow.py b/utils/wxPython/demo/wxHtmlWindow.py index 9b187a129b..eb2aac73e3 100644 --- a/utils/wxPython/demo/wxHtmlWindow.py +++ b/utils/wxPython/demo/wxHtmlWindow.py @@ -14,12 +14,20 @@ class MyHtmlWindow(wxHtmlWindow): wxHtmlWindow.__init__(self, parent, id) self.log = log - def OnLinkClicked(self, link): - self.log.WriteText('OnLinkClicked: %s\n' % link) - # Virtuals in the base class have been renamed with base_ on the font. - self.base_OnLinkClicked(link) + def OnLinkClicked(self, linkinfo): + self.log.WriteText('OnLinkClicked: %s\n' % linkinfo.GetHref()) + # Virtuals in the base class have been renamed with base_ on the front. + self.base_OnLinkClicked(linkinfo) + + + def OnSetTitle(self, title): + self.log.WriteText('OnSetTitle: %s\n' % title) + self.base_OnSetTitle(title) + +## def __del__(self): +## print 'MyHtmlWindow.__del__' class TestHtmlPanel(wxPanel): @@ -31,7 +39,6 @@ class TestHtmlPanel(wxPanel): if not self.cwd: self.cwd = os.getcwd() - self.html = MyHtmlWindow(self, -1, log) self.html.SetRelatedFrame(frame, "wxPython: (A Demonstration) -- %s") self.html.SetRelatedStatusBar(0) @@ -42,9 +49,9 @@ class TestHtmlPanel(wxPanel): self.box.Add(self.html, 1, wxGROW) subbox = wxBoxSizer(wxHORIZONTAL) - btn = wxButton(self, 1201, "Show Default") - EVT_BUTTON(self, 1201, self.OnShowDefault) - subbox.Add(btn, 1, wxGROW | wxALL, 2) +## btn = wxButton(self, 1201, "Show Default") +## EVT_BUTTON(self, 1201, self.OnShowDefault) +## subbox.Add(btn, 1, wxGROW | wxALL, 2) btn = wxButton(self, 1202, "Load File") EVT_BUTTON(self, 1202, self.OnLoadFile) @@ -80,6 +87,9 @@ class TestHtmlPanel(wxPanel): self.OnShowDefault(None) +## def __del__(self): +## print 'TestHtmlPanel.__del__' + def OnShowDefault(self, event):