#Creating GUI with tkinter
import tkinter as tk
from tkinter import *
def send():
msg = EntryBox.get("1.0",'end-1c').strip()
EntryBox.delete("0.0",END)
if msg != '':
ChatLog.config(state=NORMAL)
ChatLog.insert(END, "You: " + msg + '\n\n')
ChatLog.config( font=("Verdana", 15 ,'bold'),fg='green')
res = chatbot_response(msg)
ChatLog.insert(END, "MyBot:: " + res + '\n\n')
ChatLog.config(state=DISABLED)
ChatLog.yview(END)
base = Tk()
base.title("Hello")
base.geometry("400x500")
base.resizable(width=False, height=False)
#Create Chat window
ChatLog = Text(base, bg="#CCD1D1", height="8", width="50", font="Arial")
ChatLog.config(state=DISABLED)
#Bind scrollbar to Chat window
scrollbar = Scrollbar(base, command=ChatLog.yview, cursor="heart")
ChatLog['yscrollcommand'] = scrollbar.set
#Create Button to send message
SendButton = Button(base, font=("Verdana",15,'bold'), text="Enter", width="12", height=10,
bd=10, bg='green', fg='#58D68D',
command= send )
#Create the box to enter message
EntryBox = Text(base, bg="#CCD1D1",width="29", height="5", font="Arial")
#Place all components on the screen
scrollbar.place(x=376,y=6, height=386)
ChatLog.place(x=6,y=6, height=386, width=370)
EntryBox.place(x=128, y=401, height=90, width=265)
SendButton.place(x=6, y=401, height=90)
base.mainloop()
Как я могу добавить границу в поле ввода текста?
Я пытался задать bg = 4 или bg = 5, но все еще не смог увидеть появление границы.
Как я могу решить эту проблему, а также как добавить цвет на кнопку Enter?