Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The image does not fill the button entirely #2459

Open
Betrayal5414 opened this issue Jun 6, 2024 · 1 comment
Open

The image does not fill the button entirely #2459

Betrayal5414 opened this issue Jun 6, 2024 · 1 comment

Comments

@Betrayal5414
Copy link

Betrayal5414 commented Jun 6, 2024

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

@dipeshSam
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants