我的主屏幕是白色背景,但是在灰色的小部件之间会损坏,请使用任何解决方案。
我没有任何错误,但带有Gui输出
global screen
screen = Tk()
screen.geometry("500x500")
screen.iconbitmap(r'C:\Users\Aseel\Downloads\garage_SN3_icon.ico')
screen.configure(background='#fff')
global login_username
login_username = StringVar(screen);
global login_password
login_password = StringVar(screen);
screen.title("نظام إدارة محطة الغسيل")
m1 = PanedWindow(screen, bg="white")
m1.pack(fill=BOTH, expand="0")
img = ImageTk.PhotoImage(Image.open(r"C:\Users\Aseel\Downloads\lock.png"))
m1.configure(bg="red")
top = Label(m1, image=img)
m1.add(top)
for x in range(1, 3):
Label(text="").pack()
Label(screen, text="اسم المستخدم", font=("Cairo", 10), bg="#fff").pack()
username_login = Entry(screen, textvariable=login_username, font=("Cairo", 10))
username_login.pack()
Label(screen, text="كلمة السر", font=("Cairo", 10), bg="#fff").pack()
password_login = Entry(screen, textvariable=login_password, font=("Cairo", 10))
password_login.pack()
Label(text="").pack()
Button(text="تسجيل الدخول", height="1", width="20", command=login_user, relief=GROOVE, font=("Cairo", 10)).pack()
Label(text="").pack()
Button(text="إنشاء حساب جديد", height="1", width="20", command=register, relief=GROOVE, font=("Cairo", 10)).pack()
mainloop()