So, this seems like it should be the default to me... if you're going to make your own picture for a button, I don't see why you'd want the default border around it, but I can't for the life of me figure out how to get rid of it.

I also need to change the picture of the button while it's pressed (and change back once it's released) so you can tell that you're actually pressing it.

I actually did figure this out yesterday (It literally took all day though.), but deleted the code because I decided not to use that button, and now I can't figure it out again. (Gotta remember to save these things. =/)

Could you give me an example of how to do it?

5 Years
Discussion Span
Last Post by vegaseat

Can I add one more question to this? (It doesn't let me edit the first post anymore, sorry.)

Before, when I had the borderless bitmap button, if it overlapped something else, it would cause part of the other object to become invisible, where the border would have been. Is there a way to stop that from happening? Basically, the border is still there, it's just invisible, and when it overlaps things, it obstructs them.


Hello friend ,will first the first question , i tried to add ",highlightthickness=0" to the propreties of your Button like :

select = Button(destination, text = "Parcourir",highlightthickness=0, command = deuxfonctions)

Good luck


Here is an example ...

# show a Tkinter button without border
# see also Button at:
# http://infohost.nmt.edu/tcc/help/pubs/tkinter/tkinter.pdf

    # Python2
    import Tkinter as tk
except ImportError:
    # Python3
    import tkinter as tk

root = tk.Tk()
root.title("A button without border")

# pick a GIF image you have in the working directory
# or give full path
image = tk.PhotoImage(file='Farm.gif')

# create a button to display the image
# use bd or borderwidth zero for no border
button = tk.Button(root, image=image, bd=0)
# position the widgets
button.grid(row=1, column=1)


Edited by vegaseat: n/a

Attachments Farm.gif 78.22 KB
This article has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.