X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f6bcfd974ef26faf6f91a62cac09827e09463fd1..a92b0cfd2bd0bef75b43c071df0b0e028f360d8e:/wxPython/demo/wxHtmlWindow.py diff --git a/wxPython/demo/wxHtmlWindow.py b/wxPython/demo/wxHtmlWindow.py index eb2aac73e3..cd15d3f131 100644 --- a/wxPython/demo/wxHtmlWindow.py +++ b/wxPython/demo/wxHtmlWindow.py @@ -13,6 +13,12 @@ class MyHtmlWindow(wxHtmlWindow): def __init__(self, parent, id, log): wxHtmlWindow.__init__(self, parent, id) self.log = log + EVT_SCROLLWIN( self, self.OnScroll ) + + def OnScroll( self, event ): + print 'event.GetOrientation()',event.GetOrientation() + print 'event.GetPosition()',event.GetPosition() + event.Skip() def OnLinkClicked(self, linkinfo): @@ -26,8 +32,13 @@ class MyHtmlWindow(wxHtmlWindow): self.log.WriteText('OnSetTitle: %s\n' % title) self.base_OnSetTitle(title) -## def __del__(self): -## print 'MyHtmlWindow.__del__' + def OnCellMouseHover(self, cell, x, y): + self.log.WriteText('OnCellMouseHover: %s, (%d %d)\n' % (cell, x, y)) + self.base_OnCellMouseHover(cell, x, y) + + def OnCellClicked(self, cell, x, y, evt): + self.log.WriteText('OnCellClicked: %s, (%d %d)\n' % (cell, x, y)) + self.base_OnCellClicked(cell, x, y, evt) class TestHtmlPanel(wxPanel): @@ -133,6 +144,7 @@ class TestHtmlPanel(wxPanel): def OnPrint(self, event): + ##self.printer.GetPageSetupData().SetMarginTopLeft((100,100)) self.printer.PrintFile(self.html.GetOpenedPage()) #----------------------------------------------------------------------