admin管理员组

文章数量:1125735

I'm just starting at programming, don't even know basics well. Trying to build an app from my own assets, and they all is transparent more or less. I managed to create a window where's background image is transparent, so I can keep textured edges. But I have no idea how to now put the buttons and stuff cause they all drawn the same way. There's my current code and image examples. Hope you can help

from tkinter import *
from tkinter import PhotoImage
from PIL import Image, ImageTk

# Creating root
parent = Tk()

# Main window
parent.image = PhotoImage(file='ui det/main window.png')
label = Label(parent, image=parent.image, bg='white')
# Settings
parent.title('Write it!')
parent.geometry('1300x711')
# Transparency settings
parent.overrideredirect(True)
parent.lift()
parent.wm_attributes('-topmost', True)
parent.wm_attributes("-disabled", True)
parent.wm_attributes("-transparentcolor", "white")


# Start GUI
label.pack()
label.mainloop()

I found many examples of adding transparent image to the background, bub none of this worked when it comes to background that was already with transparency.

本文标签: