If you run the following code (on Windows 7, Python 2.6.5), you should see a light border around a black square and some text below it. How do I get rid of that border?

Thanks!

from Tkinter import *    

class App:

    def __init__(self, master):
        #background frame
        self.bgFrame = Frame(master, bg="black", bd=0)
        self.bgFrame.grid()

        #image area
        self.canvas = Canvas(self.bgFrame, width=200, height=200,
                             bd=0, bg="black")
        self.canvas.grid()


        #some filler text
        self.title = Label(self.bgFrame, text="Hi there.", bg="black", fg="white")
        self.title.grid()

root = Tk()
app = App(root)
root.mainloop()

Edited 6 Years Ago by kingmu: n/a

Just a little quirk in Tkinter. Since the canvas has a default border of 2 pixels simply give it a bd=-2 to cancel it.

Just a little quirk in Tkinter. Since the canvas has a default border of 2 pixels simply give it a bd=-2 to cancel it.

Yep, that did it. Thanks vegaseat!

This question has already been answered. Start a new discussion instead.