Design:
Python Code:(Copy the code)
from tkinter import*
root=Tk()
root.geometry("300x600+0+0")
root.title("Drawer News")
root.resizable(0,0)
layout1=Label(root,bg="#6666FF",height=4,width=37)
layout1.pack()
layout2=Label(root,bg="white",height=27,width=37)
layout2.place(x=0,y=80)
#######################################################################################
########################################################################################
def drawer():
file=Toplevel(root)
file.geometry("300x600+0+0")
file.resizable(0,0)
file.title("Drawer News")
layout1=Label(file,bg="#6666FF",height=20,width=37)
layout1.pack()
layout2=Label(file,bg="white",height=27,width=37)
layout2.place(x=0,y=150)
name=Label(file,text="Saravana Kumar.P",fg="white",font="Arial 10 bold",bg="#6666FF")
name.place(x=10,y=80)
mail=Label(file,text="saravanastark8@gmail.com",fg="white",font="Arial 10",bg="#6666FF")
mail.place(x=10,y=110)
############################# Home #############################################
def h():
file=Toplevel(root)
file.geometry("300x600+0+0")
file.title("Drawer News")
file.resizable(0,0)
layout1=Label(file,bg="#6666FF",height=20,width=37)
layout1.pack()
layout2=Label(file,bg="white",height=27,width=37)
layout2.place(x=0,y=80)
B1 = Button(file,relief=RAISED,image=img,bg="#6666FF",command=drawer)
B1.place(x=2,y=6)
Login=Label(file,text="Home",bg="#6666FF",fg="white",font="Arial 12")
Login.place(x=80,y=20)
m1=Button(file,text="Home",relief=FLAT,bg="white",fg="gray",font="Arial 8 bold",command=h)
m1.place(x=50,y=200)
#######################################################################################
def trend():
file=Toplevel(root)
file.geometry("300x600+0+0")
file.title("Drawer News")
file.resizable(0,0)
layout1=Label(file,bg="#6666FF",height=20,width=37)
layout1.pack()
layout2=Label(file,bg="white",height=27,width=37)
layout2.place(x=0,y=80)
B1 = Button(file,relief=RAISED,image=img,bg="#6666FF",command=drawer)
B1.place(x=2,y=6)
Login=Label(file,text="Trending",bg="#6666FF",fg="white",font="Arial 12")
Login.place(x=80,y=20)
m2=Button(file,text="Trending",relief=FLAT,bg="white",fg="gray",font="Arial 8 bold",command=trend)
m2.place(x=50,y=250)
#######################################################################################
def latest():
file=Toplevel(root)
file.geometry("300x600+0+0")
file.title("Drawer News")
file.resizable(0,0)
layout1=Label(file,bg="#6666FF",height=20,width=37)
layout1.pack()
layout2=Label(file,bg="white",height=27,width=37)
layout2.place(x=0,y=80)
B1 = Button(file,relief=RAISED,image=img,bg="#6666FF",command=drawer)
B1.place(x=2,y=6)
Login=Label(file,text="Latest",bg="#6666FF",fg="white",font="Arial 12")
Login.place(x=80,y=20)
m3=Button(file,text="Latest",relief=FLAT,bg="white",fg="gray",font="Arial 8 bold",command=latest)
m3.place(x=50,y=300)
########################################################################################
def hl():
file=Toplevel(root)
file.geometry("300x600+0+0")
file.title("Drawer News")
file.resizable(0,0)
layout1=Label(file,bg="#6666FF",height=20,width=37)
layout1.pack()
layout2=Label(file,bg="white",height=27,width=37)
layout2.place(x=0,y=80)
B1 = Button(file,relief=RAISED,image=img,bg="#6666FF",command=drawer)
B1.place(x=2,y=6)
Login=Label(file,text="Highlight",bg="#6666FF",fg="white",font="Arial 12")
Login.place(x=80,y=20)
m4=Button(file,text="Highlight",relief=FLAT,bg="white",fg="gray",font="Arial 8 bold",command=hl)
m4.place(x=50,y=350)
######################################################################################
C = Canvas(file, height=1, width=300,bg="gray")
line = C.create_line(0,300,20000,400,fill='gray')
C.place(x=0,y=400)
######################################################################################
def setting():
file=Toplevel(root)
file.geometry("300x600+0+0")
file.title("Drawer News")
file.resizable(0,0)
layout1=Label(file,bg="#6666FF",height=20,width=37)
layout1.pack()
layout2=Label(file,bg="white",height=27,width=37)
layout2.place(x=0,y=80)
B1 = Button(file,relief=RAISED,image=img,bg="#6666FF",command=drawer)
B1.place(x=2,y=6)
Login=Label(file,text="Settings",bg="#6666FF",fg="white",font="Arial 12")
Login.place(x=80,y=20)
m5=Button(file,text="Settings",relief=FLAT,bg="white",fg="gray",font="Arial 8 bold",command=setting)
m5.place(x=50,y=420)
#####################################################################################
def need():
file=Toplevel(root)
file.geometry("300x600+0+0")
file.title("Drawer News")
file.resizable(0,0)
layout1=Label(file,bg="#6666FF",height=20,width=37)
layout1.pack()
layout2=Label(file,bg="white",height=27,width=37)
layout2.place(x=0,y=80)
B1 = Button(file,relief=RAISED,image=img,bg="#6666FF",command=drawer)
B1.place(x=2,y=6)
Login=Label(file,text="Help",bg="#6666FF",fg="white",font="Arial 12")
Login.place(x=80,y=20)
m6=Button(file,text="Help",relief=FLAT,bg="white",fg="gray",font="Arial 8 bold",command=need)
m6.place(x=50,y=470)
############################## image declare and position####################################
homebtn= Label(file,height=24,width=24,image=home,bg="white")
homebtn.place(x=0,y=200)
firebtn= Label(file,height=24,width=24,image=fire,bg="white")
firebtn.place(x=0,y=249)
clockbtn= Label(file,height=24,width=24,image=clock,bg="white")
clockbtn.place(x=0,y=300)
highlightbtn= Label(file,height=24,width=24,image=highlight,bg="white")
highlightbtn.place(x=0,y=350)
settingbtn= Label(file,height=24,width=24,image=settings,bg="white")
settingbtn.place(x=0,y=420)
helpbtn= Label(file,height=24,width=24,image=helps,bg="white")
helpbtn.place(x=0,y=470)
################################## image source path######################################################
img = PhotoImage(file="image/drag_list_down-48.png")
B1 = Button(root,relief=RAISED,image=img,bg="#6666FF",command=drawer)
B1.place(x=2,y=6)
home= PhotoImage(file="image/home-24.png")
clock=PhotoImage(file="image/clock-24.png")
fire=PhotoImage(file="image/fire-24.png")
highlight=PhotoImage(file="image/light_on-24.png")
settings=PhotoImage(file="image/settings-24.png")
helps=PhotoImage(file="image/help-24.png")
########################################################################################
Login=Label(root,text="Drawer News",bg="#6666FF",fg="white",font="Arial 12")
Login.place(x=80,y=20)
Email=Label(root,text="Email",bg="white",fg="#FF3399",font="Arial 10")
Email.place(x=50,y=200)
E1=Entry(root,fg="gray",relief=FLAT)
E1.place(x=50,y=250)
E1.focus()
C = Canvas(root, height=1, width=200,bg="red")
line = C.create_line(0,0,10000,100,fill='red')
C.place(x=50,y=270)
password=Label(root,text="Password",bg="white",fg="#FF3399",font="Arial 10")
password.place(x=50,y=320)
E2=Entry(root,fg="gray",relief=FLAT)
E2.place(x=50,y=370)
C = Canvas(root, height=1, width=200,bg="red")
line = C.create_line(0,0,10000,100,fill='red')
C.place(x=50,y=390)
b1=Button(root,text="LOGIN",bg="#FF3399",fg="white",font="Arial 12",width=18,relief=FLAT,activebackground ="#FF3399",activeforeground="white")
b1.place(x=50,y=440)
root.mainloop
Code & Concept Copyrights@Saravanakumar from psktechnology
Comments
Post a Comment