0

I have a button that is an image. I would like to make the background of the image transparent as it is currently showing the png background.

Thank you for any help.

This is my code and what the window currently looks like:

def main_page():
    # Themes
    ctk.set_default_color_theme("dark-blue")
    ctk.set_appearance_mode("dark")

    # Main Page Window
    app = ctk.CTk()
    app.title("Main Page")
    app.geometry("500x500")
    app.attributes("-fullscreen", True)
    app.grid_columnconfigure(0, weight=1)

    database_image = ctk.CTkImage(light_image=Image.open('database_logo.png'),         
    dark_image=Image.open('database_logo.png'), size=(300, 300))
    database_label = ctk.CTkLabel(app, image=database_image, text="")
    database_button = ctk.CTkButton(app, image= database_image, border_width=0, text="")
    database_button.pack(pady=30)

app.mainloop()

Current window

1 Answer 1

0

The image dont have .png format, the background is white, you must use a image with correctly format pg. this image

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.