 
       wx.lib.agw.hyperlink.HyperLinkCtrl¶
  wx.lib.agw.hyperlink.HyperLinkCtrl¶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 browser window.
 Methods Summary¶
 Methods Summary¶| __init__ | Default class constructor. | 
| AutoBrowse | Automatically browse to URL when clicked. | 
| DisplayError | Displays an error message (according to the ReportErrors parameter) in a | 
| DoPopup | Sets whether to show popup menu on right click or not. | 
| EnableRollover | Enable/disable rollover. | 
| GetBold | Returns whether the HyperLinkCtrlhas text in bold or not. | 
| GetColours | Gets the colours for the link, the visited link and the mouse | 
| GetLinkCursor | Gets the link cursor. | 
| GetUnderlines | Returns if link is underlined, if the mouse rollover is | 
| GetURL | Retrieve the URL associated to the HyperLinkCtrl. | 
| GetVisited | Returns whether a link has been visited or not. | 
| GotoURL | Goto the specified URL. | 
| OnMouseEvent | Handles the wx.EVT_MOUSE_EVENTSevents forHyperLinkCtrl. | 
| OnPopUpCopy | Handles the wx.EVT_MENUevent forHyperLinkCtrl. | 
| OpenInSameWindow | Open multiple URL in the same window (if possible). | 
| ReportErrors | Set whether to report browser errors or not. | 
| SetBold | Sets the HyperLinkCtrllabel in bold text. | 
| SetColours | Sets the colours for the link, the visited link and the mouse rollover. | 
| SetLinkCursor | Sets link cursor properties. | 
| SetUnderlines | Sets whether the text should be underlined or not for new links, visited | 
| SetURL | Sets the HyperLinkCtrltext to the specified URL. | 
| SetVisited | Sets a link as visited. | 
| UpdateLink | Updates the link, changing text properties if | 
 Class API¶
 Class API¶HyperLinkCtrl(StaticText)¶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 browser window.
__init__(self, parent, id=-1, label="", pos=wx.DefaultPosition, size=wx.DefaultSize, style=0, name="staticText", URL="")¶Default class constructor.
| Parameters: | 
 | 
|---|
Note
Pass URL=”” to use the label as the url link to navigate to.
AutoBrowse(self, AutoBrowse=True)¶Automatically browse to URL when clicked.
| Parameters: | AutoBrowse – Trueto automatically browse to an URL when clicked,Falseotherwise. | 
|---|
Note
Set AutoBrowse to False to receive EVT_HYPERLINK_LEFT events.
DisplayError(self, ErrorMessage, ReportErrors=True)¶Displays an error message (according to the ReportErrors parameter) in a
MessageBox.
| Parameters: | 
 | 
|---|
DoPopup(self, DoPopup=True)¶Sets whether to show popup menu on right click or not.
| Parameters: | DoPopup – Trueto show a popup menu on right click,Falseotherwise. | 
|---|
EnableRollover(self, EnableRollover=False)¶Enable/disable rollover.
| Parameters: | EnableRollover – Trueto enable text effects during rollover,Falseto disable them. | 
|---|
GetBold(self)¶Returns whether the HyperLinkCtrl has text in bold or not.
GetColours(self)¶Gets the colours for the link, the visited link and the mouse rollover.
GetLinkCursor(self)¶Gets the link cursor.
GetUnderlines(self)¶Returns if link is underlined, if the mouse rollover is underlined and if the visited link is underlined.
GetURL(self)¶Retrieve the URL associated to the HyperLinkCtrl.
GetVisited(self)¶Returns whether a link has been visited or not.
GotoURL(self, URL, ReportErrors=True, NotSameWinIfPossible=False)¶Goto the specified URL.
| Parameters: | 
 | 
|---|
OnMouseEvent(self, event)¶Handles the wx.EVT_MOUSE_EVENTS events for HyperLinkCtrl.
| Parameters: | event – a MouseEventevent to be processed. | 
|---|
OnPopUpCopy(self, event)¶Handles the wx.EVT_MENU event for HyperLinkCtrl.
| Parameters: | event – a wx.MenuEventevent to be processed. | 
|---|
Note
This method copies the data from the HyperLinkCtrl to the clipboard.
OpenInSameWindow(self, NotSameWinIfPossible=False)¶Open multiple URL in the same window (if possible).
| Parameters: | NotSameWinIfPossible – Trueto open an hyperlink in a new browser
window,Falseto use an existing browser window. | 
|---|
ReportErrors(self, ReportErrors=True)¶Set whether to report browser errors or not.
| Parameters: | ReportErrors – Use Trueto display error dialog if an error
occurrs navigating to the URL; | 
|---|
SetBold(self, Bold=False)¶Sets the HyperLinkCtrl label in bold text.
| Parameters: | Bold – Trueto set theHyperLinkCtrllabel as bold,Falseotherwise. | 
|---|
SetColours(self, link=wx.Colour(0, 0, 255), visited=wx.Colour(79, 47, 79), rollover=wx.Colour(0, 0, 255))¶Sets the colours for the link, the visited link and the mouse rollover.
| Parameters: | 
|---|
SetLinkCursor(self, cur=wx.CURSOR_HAND)¶Sets link cursor properties.
| Parameters: | cur – an integer representing a Cursorconstant. | 
|---|
SetUnderlines(self, link=True, visited=True, rollover=True)¶Sets whether the text should be underlined or not for new links, visited links and rollovers.
| Parameters: | 
 | 
|---|
SetURL(self, URL)¶Sets the HyperLinkCtrl text to the specified URL.
| Parameters: | URL – the new URL associated with HyperLinkCtrl. | 
|---|
SetVisited(self, Visited=False)¶Sets a link as visited.
| Parameters: | Visited – Trueto set a link as visited,Falseotherwise. | 
|---|
UpdateLink(self, OnRefresh=True)¶Updates the link, changing text properties if:
| Parameters: | OnRefresh – Trueto refresh the control,Falseotherwise. | 
|---|