From 96b4b59fa4c6216efd1296ebb2a13a6f703fa131 Mon Sep 17 00:00:00 2001 From: "Richard Horton (hortonr6)" Date: Wed, 1 Nov 2017 12:50:24 +0000 Subject: [PATCH] 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 --- GUITesting/GUITest2 | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 GUITesting/GUITest2 diff --git a/GUITesting/GUITest2 b/GUITesting/GUITest2 new file mode 100644 index 0000000..57361eb --- /dev/null +++ b/GUITesting/GUITest2 @@ -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("", cb) +output = tk.Label(root, text='') +output.pack() + +tk.mainloop()