This class shows a static text element which links to an URL.
Appearance and behaviour is completely customizable.
In fact, when the user clicks on the hyperlink, a HyperlinkEvent is sent but if that event is not handled (or it’s skipped; see Event.Skip ), then a call to LaunchDefaultBrowser is done with the hyperlink’s URL.
Note that standard Window functions like Window.SetBackgroundColour , Window.SetFont , Window.SetCursor , Window.SetLabel can be used to customize appearance of the hyperlink.
This class supports the following styles:
Handlers bound for the following event types will receive a HyperlinkEvent parameter.
Currently this class is implemented using native support in wxGTK and wxMSW (under Windows XP and later only) and a generic version is used by the other ports.
See also
URL, HyperlinkEvent
__init__ | |
Create | Creates the hyperlink control. |
GetHoverColour | Returns the colour used to print the label of the hyperlink when the mouse is over the control. |
GetNormalColour | Returns the colour used to print the label when the link has never been clicked before (i.e. |
GetURL | Returns the URL associated with the hyperlink. |
GetVisited | Returns True if the hyperlink has already been clicked by the user at least one time. |
GetVisitedColour | Returns the colour used to print the label when the mouse is not over the control and the link has already been clicked before (i.e. |
SetHoverColour | Sets the colour used to print the label of the hyperlink when the mouse is over the control. |
SetNormalColour | Sets the colour used to print the label when the link has never been clicked before (i.e. |
SetURL | Sets the URL associated with the hyperlink. |
SetVisited | Marks the hyperlink as visited (see HyperlinkCtrl.SetVisitedColour ). |
SetVisitedColour | Sets the colour used to print the label when the mouse is not over the control and the link has already been clicked before (i.e. |
HoverColour | See GetHoverColour and SetHoverColour |
NormalColour | See GetNormalColour and SetNormalColour |
URL | See GetURL and SetURL |
Visited | See GetVisited and SetVisited |
VisitedColour | See GetVisitedColour and SetVisitedColour |
This class shows a static text element which links to an URL.
Possible constructors:
HyperlinkCtrl()
HyperlinkCtrl(parent, id=ID_ANY, label='', url='',
pos=DefaultPosition, size=DefaultSize, style=HL_DEFAULT_STYLE,
name=HyperlinkCtrlNameStr)
Overloaded Implementations:
__init__ (self)
__init__ (self, parent, id=ID_ANY, label=’‘, url=’‘, pos=DefaultPosition, size=DefaultSize, style=HL_DEFAULT_STYLE, name=HyperlinkCtrlNameStr)
Constructor.
See Create for more info.
Parameters: |
---|
Creates the hyperlink control.
Parameters: |
|
---|---|
Return type: | bool |
Returns the colour used to print the label of the hyperlink when the mouse is over the control.
Return type: | Colour |
---|
Returns the colour used to print the label when the link has never been clicked before (i.e.
the link has not been visited) and the mouse is not over the control.
Return type: | Colour |
---|
Returns the URL associated with the hyperlink.
Return type: | string |
---|
Returns True if the hyperlink has already been clicked by the user at least one time.
Return type: | bool |
---|
Returns the colour used to print the label when the mouse is not over the control and the link has already been clicked before (i.e.
the link has been visited).
Return type: | Colour |
---|
Sets the colour used to print the label of the hyperlink when the mouse is over the control.
Parameters: | colour (Colour) – |
---|
Sets the colour used to print the label when the link has never been clicked before (i.e.
the link has not been visited) and the mouse is not over the control.
Parameters: | colour (Colour) – |
---|
Sets the URL associated with the hyperlink.
Parameters: | url (string) – |
---|
Marks the hyperlink as visited (see HyperlinkCtrl.SetVisitedColour ).
Parameters: | visited (bool) – |
---|
Sets the colour used to print the label when the mouse is not over the control and the link has already been clicked before (i.e.
the link has been visited).
Parameters: | colour (Colour) – |
---|
See GetHoverColour and SetHoverColour
See GetNormalColour and SetNormalColour
See GetVisited and SetVisited
See GetVisitedColour and SetVisitedColour