From d7d6b7cdfefd6dddea751662ee0816ea30520676 Mon Sep 17 00:00:00 2001 From: "Richard Horton (hortonr6)" Date: Wed, 1 Nov 2017 11:44:53 +0000 Subject: [PATCH] Updated GUI.py with more demo functionality Still nothing that will really be used in the final version but this should start to give us an idea of how some elements will work --- GUI.py | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/GUI.py b/GUI.py index ce55091..87efc49 100644 --- a/GUI.py +++ b/GUI.py @@ -10,14 +10,25 @@ window.configure(background="cornflower blue") #creates title text displayed in the window lblTitle = tkinter.Label(window, text="CHATBOT JEFF\n\n", bg="cornflower blue", font=(24)) -lblTitle.pack() +lblTitle.grid(row = 0, column = 1) #creates intro text lblDesc = tkinter.Label(window, text="Welcome to Chatbot-Jeff\n\nThis chatbot was created by ALL group A1\n\n\n", bg="cornflower blue") -lblDesc.pack() +lblDesc.grid(row = 2, column = 1) #creates the button (currently a non-functional button) btnBegin = tkinter.Button(window, text="Click To Launch Chatbot") -btnBegin.pack() +btnBegin.grid(row = 3, column = 1) + +def fetchFunc(): + usrInput = entry.get() + lblUsrIn = tkinter.Label(window, text=usrInput) + lblUsrIn.grid(row = 6, column = 2) + return 0 + +entry = tkinter.Entry(window) +entry.grid(row = 5, column = 1) +btnSubmit = tkinter.Button(window, text="Submit", command=fetchFunc) +btnSubmit.grid(row = 6, column = 1) window.mainloop()