Skip to content
Permalink
Browse files
Created GUITest2
This requires the other files to run but is not a part of the main program, it is just being stored on GitHub to allow easy access
  • Loading branch information
hortonr6 committed Nov 1, 2017
1 parent ea7bc34 commit 96b4b59fa4c6216efd1296ebb2a13a6f703fa131
Showing 1 changed file with 25 additions and 0 deletions.
@@ -0,0 +1,25 @@
import random
import tkinter as tk
import Get_Functions as GF

root = tk.Tk()
root.geometry("150x150")

lblNameAsk = tk.Label(root, text="What is your name?")
lblNameAsk.pack()

userInput = tk.Entry(root)
userInput.pack()

def cb(event):
userText = userInput.get()
userName = GF.getName(userText)
userName = userName.title()
botText = "Hello " + userName + ", it's nice to meet you"
output.config(text=botText)

userInput.bind("<Return>", cb)
output = tk.Label(root, text='')
output.pack()

tk.mainloop()

0 comments on commit 96b4b59

Please sign in to comment.