我想使用customtkinter制作一个简单的dhikrmatik(当按下按钮时,数字会增加并写在屏幕上)应用程序。我添加了背景图片,并想在图片上添加按钮,但结果如图所示。您的文字解决方案是什么?本文是用谷歌翻译写的,如有错误,敬请谅解。谢谢
from PIL import Image
import customtkinter
customtkinter.set_appearance_mode("systemTransparent")
root= customtkinter.CTk()
root.geometry("400x550")
my_image= customtkinter.CTkImage(
dark_image=Image.open("zikirmat\image2.png"),
light_image=Image.open("zikirmat\image.png"),
size=(300,300))
my_label =customtkinter.CTkLabel(root, width=30, height=35, image=my_image, text="")
my_label.place(x=50,y=5)
button =customtkinter.CTkButton(root,
text="",
width=110,
height=110,
corner_radius=100,
)
#button.configure(bg="white", alpha=0.5)
button.place(y=180,x=100)
root.mainloop()