I'm wondering if it's possible to change the border color of a tkinter entry widget border. I don't think it is, because no such option exists in relevant documentation. You can change the width, but that just results in the whitespace being recessed - creating a raised 3d border.

If it can't be done, would it be more valid to use a frame around the widget? Is it possible to combine the border width and a frame to create a good appearance?

Thank you.

Recommended Answers

All 2 Replies

Actually, a frame alone is enough to produce the effect I desired. I'm sorry to waste space and time.

Here's the code.

#!/usr/bin/env python
#Python 3.1

from tkinter import *

master = Tk()
nameentryframe = Frame(master, background = 'BLACK', borderwidth = 1, relief = SUNKEN)
nameentry = Entry(nameentryframe)


Thanks for letting us know. I would have done it the same way too, since Frame has the convenient borderwidth arg.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.