CustomTkinter icon indicating copy to clipboard operation
CustomTkinter copied to clipboard

The image does not fill the button entirely

Open Betrayal5414 opened this issue 1 year ago • 1 comments

can we fill a button entirely with an image?

# Images
self.IMG = ctk.CTkImage(light_image=Image.open("images/btn-1.png"), size=(140, 40))

# Buttons
self.btn_p1 = ctk.CTkButton(self, image=self.IMG, text="", width=140, height=40)
self.btn_p2 = ctk.CTkButton(self, image=self.IMG, text="", width=140, height=40)
self.btn_p3 = ctk.CTkButton(self, image=self.IMG, text="", width=140, height=40)

Exemple : button

My image doesn't completely fill the button. We see it when we the button is hover

Betrayal5414 avatar Jun 06 '24 10:06 Betrayal5414

Either use CTkLabel or set hover=False to CTkButton constructor.

dipeshSam avatar Jun 06 '24 11:06 dipeshSam