xxxxxxxxxx
import tkinter as tk
# Create a tkinter window
window = tk.Tk()
# Create a frame with a border and set its border color
frame = tk.Frame(window, relief=tk.RAISED, borderwidth=2)
frame.configure(bg="white", highlightbackground="red")
# Pack the frame to display it
frame.pack()
# Run the tkinter event loop
window.mainloop()
xxxxxxxxxx
# import tkinter
from tkinter import *
# Create Tk object
window = Tk()
# Set the window title
window.title('GFG')
# Entry Widget
# highlightthickness for thickness of the border
entry = Entry(highlightthickness=2)
# highlightbackground and highlightcolor for the border color
entry.config(highlightbackground = "red", highlightcolor= "red")
# Place the widgets in window
entry.pack(padx=20, pady=20)
window.mainloop()
xxxxxxxxxx
from tkinter import *
COLOR = "black"
root = Tk()
root.config(bg=COLOR)
button = Button(text="button", bg=COLOR)
button.pack(padx=5, pady=5)
entry = Entry(bg=COLOR, fg='white')
entry.pack(padx=5, pady=5)
text = Text(bg=COLOR, fg='white')
text.pack(padx=5, pady=5)
root.mainloop()