HyperLinkCtrl is a control for wxPython that acts like a hyper link
in a typical browser. Latest features include the ability to capture
your own left, middle, and right click events to perform your own
custom event handling and ability to open link in a new or current
Special thanks to Robin Dunn for the event binder for the 3 mouse buttons.
import wx.lib.agw.hyperlink as hl
def __init__(self, parent):
wx.Frame.__init__(self, parent, -1, "HyperLink Demo")
panel = wx.Panel(self, -1)
# Default Web links:
hyper1 = hl.HyperLinkCtrl(panel, -1, "wxPython Main Page", pos=(100, 100),
# Web link with underline rollovers, opens in same window
hyper2 = hl.HyperLinkCtrl(panel, -1, "My Home Page", pos=(100, 150),
hyper2.SetColours("BLUE", "BLUE", "BLUE")
hyper2.SetUnderlines(False, False, True)
# our normal wxApp-derived class, as usual
app = wx.PySimpleApp()
frame = MyFrame(None)
This code snippet can be downloaded, see this example script.
Some of the AGW snippets of code in the documentation use images and external files
(to create bitmaps or access external data). As these files are not provided in these snippets,
you should make the approriate modifications to the code to actually run it.
License And Version
HyperLinkCtrl is distributed under the wxPython license.
Latest Revision: Andrea Gavana @ 17 Aug 2011, 15.00 GMT
Module author: Andrea Gavana <firstname.lastname@example.org>
A graphical representation of the SVN commits in the last year.
Click on any date in the picture to
jump to that particular revision page, containing information about committers, log
messages and SVN diffs.
Revision Graph For hyperlink