-
Notifications
You must be signed in to change notification settings - Fork 30
LinkLabel
The LinkLabel
widget is a widget that offers the option to open a hyperlink when clicked in the default browser of the system it's running on.
Using a LinkLabel
is not much different from using a normal Label
widget. It just has a few more options you can use to set-up its link properties. This can be done by passing keyword arguments at initialization, or you can use the normal Widget
functions to change it while your program is running (cget
, configure
, __getitem__
and __setitem__
).
These additonal options are available:
-
link
A
str
variable that contains the link to open when theLinkLabel
is clicked. -
normal_color
A valid
Tkinter
color name instr
type for the text color in theLinkLabel
. -
hover_color
A valid
Tkinter
color name instr
type for the text color in theLinkLabel
while the mouse is hovering over theLinkLabel
. -
clicked_color
A valid
Tkinter
color name instr
type for the text color in theLinkLabel
while the mouse is not hovering but theLinkLabel
has been clicked at least once.
These additional functions are available:
-
reset(self)
Resets the visited count (and thus
normal_color
is shown again as text color if theLinkLabel
had been clicked).