#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()
Asked
Active
Viewed 143 times
1
-
You've posted too much code. If the question is about a border on a widget, we only need to see the widget, the code you're using to add the border, and enough other code to make it work. We don't need a bunch of other widgets. See [mcve]. – Bryan Oakley Apr 21 '20 at 20:13
1 Answers
0
bg
is for the background color, not the border. You need to use the borderwidth
(or bd
) and/or relief
options.

Bryan Oakley
- 370,779
- 53
- 539
- 685