WxHTML window

Mitch Chapman mitchchapman at earthlink.net
Thu Oct 21 09:51:43 EDT 2004


lutherrevisited at aol.com (LutherRevisited) wrote in message news:<20041020212905.08741.00002215 at mb-m13.aol.com>...
> I'm using a wxhtml window to display an email message, my question is, what do
> I need to put in onLinkClicked to make it to where a link is opened in my
> default browser instead of in the wxhtml window?

This works for me (wxPython 2.4.2.1, Python 2.3, Solaris 2.8):

import webbrowser
...
class MyHtml(html.wxHtmlWindow):
...
    def OnLinkClicked(self, linkInfo):
        webbrowser.open(linkInfo.GetHref())



More information about the Python-list mailing list