from tkinter import *
import tkinter.messagebox as tm
class log_in:
def __init__(self,pencere):
self.pencere=pencere
self.pencere.title('Planlama')
self.Kullanıcı_Adi = Label(self.pencere,text='Kullanıcı Adı:').grid(row=0,column=0)
self.Paralo_Adi = Label(self.pencere, text='Parolanızı Giriniz:').grid(row=1,column=0)
self.Kullanıcı = Entry(self.pencere)
self.Kullanıcı.grid(row=0,column=1)
self.Parola = Entry(self.pencere,show="*")
self.Parola.grid(row=1,column=1)
self.Giris_Button = Button(self.pencere,text=' Giriş ',width=7,command=self.giris_bolumu).place(relx=0.7,rely=0.6)
self.Hatirla = Checkbutton(self.pencere,text='Beni Hatırla').grid(row=3,sticky=W)
def giris_bolumu(self):
kullanıcı_bilgisi=self.Kullanıcı.get()
paralo_bilgisi=self.Parola.get()
if not self.Kullanıcı.get():
bosluk=tm.askyesno(title="Hata!",message="Gerekli yerleri doldurmadınız,tekrar giriş yapma ister misiniz?")
if bosluk == 'no':
self.pencere.destroy
if (kullanıcı_bilgisi == 'asd') and (paralo_bilgisi == 'asd123'):
self.olumlu=tm.showinfo('Giriş','Hoşgeldiniz')
#else:
#olumsuz=tm.showerror('Giriş İptal','Hatalı Giriş')
pencere=Tk()
uygulama=log_in(pencere)
pencere.mainloop()
şifre hata kısmında kişi no’ya bastığı zaman kullanıcı adı ve parola giriş kısmının kpanmasını istiyorum tamamen,ama self.pencere.destroy yapmama rağmen kapanmıyor
yardımlarınızı bekliyorum