samedi 28 février 2015

limit the size of a button with an image

Problem:


I want to create an own widget that uses an image in an button. But the image causes the button to be way to big. How can I resize the button to the normal button size (the size if I use normal Text).

Code:



add = Button(master=controlfrm , image=myimagepath)
add.pack()


Result:


this is the result of my code


Goal:


I want the image to be resized to a hight equal to the Entry widget.


Aucun commentaire:

Enregistrer un commentaire