Update gui.py

This commit is contained in:
B.Jothin kumar 2021-10-13 13:04:11 +05:30 committed by GitHub
parent 81d235c50c
commit 3bd0d51e5d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

9
gui.py
View File

@ -16,15 +16,18 @@ speak_button.pack(side=tk.LEFT, anchor=tk.SW)
def speak(text): def speak(text):
chat_listbox.insert('end', f'Assistant: {text}') chat_listbox.insert('end', f'Assistant: {text}')
root.geometry('700x500')
chat_listbox.pack(fill=tk.Y, side=tk.LEFT) for x in range(1, 1001):
speak(str(x))
scroll_bar.pack(side=tk.RIGHT, fill=tk.Y) scroll_bar.pack(side=tk.RIGHT, fill=tk.Y)
chat_listbox.pack(fill=tk.BOTH, side=tk.RIGHT)
scroll_bar.configure(command=chat_listbox.yview) scroll_bar.configure(command=chat_listbox.yview)
chat_listbox.configure(yscrollcommand=scroll_bar.set) chat_listbox.configure(yscrollcommand=scroll_bar.set)
main_frame.pack(fill=tk.BOTH) main_frame.pack(fill=tk.BOTH)
root.geometry('700x500') root.geometry('700x500')
root.minsize(700, 500)
root.wm_title('Desktop assistant') root.wm_title('Desktop assistant')
root.resizable(False, False) root.resizable(False, True)
mainloop = root.mainloop mainloop = root.mainloop
mainloop()