Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
chatbot-jeff/HLTest.py
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
33 lines (24 sloc)
781 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Obselete Code - Used to test external code stored in tkHyperlinkManager.py | |
import tkHyperlinkManager | |
import webbrowser | |
import tkinter as tk | |
root = tk.Tk() | |
root.title("Hyperlink Manager Test") | |
text = tk.Text(root) | |
text.pack() | |
hyperlink = tkHyperlinkManager.HyperlinkManager(text) | |
def click1(): #Richard | |
print ("click 1") | |
url = "https://www.google.co.uk" | |
webbrowser.open(url, new=2) | |
text.insert(tk.INSERT, "this is a ") | |
text.insert(tk.INSERT, "link", hyperlink.add(click1)) | |
text.insert(tk.INSERT, "\n\n") | |
def click2(): #Richard | |
print ("click 2") | |
url = "https://www.google.co.uk" | |
webbrowser.open(url, new=2) | |
text.insert(tk.INSERT, "this is another ") | |
text.insert(tk.INSERT, "link", hyperlink.add(click2)) | |
text.insert(tk.INSERT, "\n\n") | |
tk.mainloop() |