Welcome, Visitor!

Hello, we are really happy that you have reached us. However, since you are viewing the forum as a visitor, you cannot benefit from many features of the forum. How about taking advantage of all the features exclusive to our members by registering? You can register right now, taking just 2 minutes of your time. We would love to see you among us.

Tkinter İle Login ve Register!

1

1Jeff

Developer & Coder
Thread Starter
Ultra Member
Joined
Oct 20, 2019
Messages
727
Reaction score
431
Points
63
Location
Helsinki
RC Point
0
Python:
from tkinter import *


def register_user():
    username_info = username.get()
    password_info = password.get()

    file = open(username_info + ".txt", "w")
    file.write(username_info + "\n")
    file.write(password_info)
    file.close()

    username_entry.delete(0, END)
    password_entry.delete(0, END)

    Label(screen1, text="Kayıt Başarılı.", fg="green", font=("calibri", 11)).pack()


def register():
    global screen1
    screen1 = Toplevel(screen)
    screen1.title("Kayit")
    screen1.geometry("550x350")

    global username
    global password
    global username_entry
    global password_entry
    username = StringVar()
    password = StringVar()

    Label(screen1, text="Detaylı Giriniz!").pack()
    Label(screen1, text="").pack()
    Label(screen1, text="Kullanıcı Adı * ").pack()
    username_entry = Entry(screen1, textvariable=username)
    username_entry.pack()
    Label(screen1, text="Şifre * ").pack()
    password_entry = Entry(screen1, textvariable=password)
    password_entry.pack()
    Label(screen1, text="").pack()
    Button(screen1, text="Kayıt Ol", width=10, height=1, command=register_user).pack()


def login():
    print("Giriş Başarılı!")


def main_screen():
    global screen
    screen = Tk()
    screen.geometry("300x250")
    screen.title("Börke Tesla")
    Label(text="Börke Tesla", bg="grey", width="300", height="2", font=("Calibri", 13)).pack()
    Label(text="").pack()
    Button(text="Giriş Yap", height="2", width="30", command=login).pack()
    Label(text="").pack()
    Button(text="Kayıt Ol", height="2", width="30", command=register).pack()

    screen.mainloop()


main_screen()


%95 i benimdir :)
 
SPAM IS FORBIDDEN!
  • SPAMMERS ARE BANNED FROM THE FORUM AND CANNOT USE ANY OF THE CHEATS
  • For example: thanks, thx, very good, asdqwe, working, ty and so on!
  • For example: Writing the same message over and over. thanks, thx and so on!
  • Copying and copying someone else's message is prohibited.
  • It is forbidden to send messages to increase the number of comments on threads that you have no knowledge of.
  • Write your own opinion when commenting!
  • If you see spam message, please let us know with the REPORT button!

Theme editor

Top Bottom