Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Python by (120 points)

from tkinter import *

from PIL import ImageTk

class login_system:

    def __init__(self,root):

        self.root=root

        self.root.title("Login System")

        self.root.geometry("1350x700+0+0")

        self.root.resizable(False,False)

        

        image=Image.open("bg.jpg")

        self.bg_icon=ImageTk.PhotoImage(image)

        self.lbl_bg=Label(self.root,image=self.bg_icon).place(x=0,y=0,relwidth=1,relheight=1)

        

        image1=Image.open("user.png")

        self.user_icon = PhotoImage(image1)

       

        image2=Image.open("pass.png")

        self.pass_icon = PhotoImage(image2)

        

        title=Label(self.root,text="login_system",font=("calibre",40,"bold"),bg="red",fg="blue").place(x=90,y=30)

        

        login_frame=Frame(self.root,bg="white")

        login_frame.place(x=400,y=150)

        

        lbl_user=Label(login_frame,text='Username',image1=self.user_icon,compound=LEFT,font("Calibre",20,"bold"),bg="white")

        lbl_user.grid(row=1,column=0,padx=20,pady=10)

Please log in to answer this question.

Related questions

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...