how to make buttons FLAT on tkinter GUI how to make buttons FLAT on tkinter GUI tkinter tkinter

how to make buttons FLAT on tkinter GUI


Set button border = 0.

bd=0

(extra caharacters to satisfy SO)


My guess is that what you're seeing is the focus highlight ring. This is used to let the user know which button has the keyboard focus. To turn that off set the highlightthickness to zero:

bouton_break = Button(..., highlightthickness=0)

If you don't want to turn it off, you can still get a more visually clean appearance by making sure the highlightbackground option to the same color as the background so that it effectively disappears when the button doesn't have focus.


Try this:

button_break = Button(f2, image=img_break, relief='flat', highlightthickness=0, bd=0, command=break_)button_break.place(bordermode=OUTSIDE, height=134, width=107, x=40, y=200)button_MM = Button(f2, image=img_MM, relief='flat', highlightthickness=0, bd=0, command=maint_page)button_MM.place(bordermode=OUTSIDE, height=134, width=107, x=170, y=200)button_logout = Button(f2, image=img_logout, relief='flat', highlightthickness =0, bd=0, command=logout_cmd)button_logout.place(bordermode=OUTSIDE, height=134, width=107, x=300, y=200)