Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #import modules
- from tkinter import *
- import random
- from tkinter import messagebox
- import importlib
- # creating the object
- root = Tk()
- # resolution of the window
- root.geometry("500x540+500+100")
- root.title ("ABC HOSPITAL")
- # preventing the resize feature
- root.resizable(False, False)
- def doc():
- importlib.import_module('login')
- #LABELS=====================================================
- heading = Label(font=('times new roman' , 25 , 'bold'), text="WELCOME TO ABC HOSPITAL", fg='black', bg='#fbf9d3')
- heading.place(x=3, y=10)
- heading = Label(font=('times new roman' , 22 , 'bold'), text="Choose Login", fg='black', bg='#fbf9d3')
- heading.place(x=150, y=250)
- #button to perform a command=======================================================
- login = Button(font=('arial' , 20 , 'bold'),bd=14, text="DOCTOR's LOGIN", fg='white',bg='#04062c',width=27,height=2, command=doc)
- login.place(x=4,y=300)
- root.mainloop()
- #import modules
- from tkinter import *
- import mysql.connector
- from mysql.connector import errorcode
- import random
- from tkinter import messagebox
- # creating the object
- root = Tk()
- # resolution of the window
- root.geometry("1520x790+0+0")
- root.title ("ABC HOSPITAL")
- root.iconbitmap('hospital.ico')
- # preventing the resize feature
- root.resizable(False, False)
- #tkinter window
- class Application:
- #funtion for main frames=====================================================================================================================================================================
- def __init__(self, master):
- self.master = master
- # creating the frames in the master
- self.left = Frame(master, width= 1600, height= 900, bg='lightblue',relief=SUNKEN)
- self.left.pack(side=TOP)
- #Background Picture
- self.photo1 = PhotoImage(file='background.png')
- self.pic = Label(self.left, font=('arial' , 1 , 'bold'), image= self.photo1)
- self.pic.place(x=0, y=0)
- #LABELS=====================================================
- self.heading = Label(self.left,font=('arial' , 50 , 'bold'), text="ABC Hospital", fg='black', bg='#06378b' ,anchor='w')
- self.heading.place(x=550, y=0)
- #Login Picture
- self.photo = PhotoImage(file= 'login.png')
- self.pic = Label(self.left, font=('arial' , 40 , 'bold'), image= self.photo ,fg = "lightblue", bg='#06378b')
- self.pic.place(x=640, y=100)
- # user name
- self.username = Label(self.left, text="Username", font=('arial 30 bold'), fg='black', bg='#063998')
- self.username.place(x=550, y=350)
- # password
- self.password = Label(self.left, text="Password", font=('arial 30 bold'), fg='black', bg='#063998')
- self.password.place(x=550, y=410)
- #TEXTBOX=====================================================
- #username
- self.username_ent = Entry(self.left,font=('arial' , 20 , 'bold'))
- self.username_ent.place(x=750, y=360)
- #password
- self.password_ent = Entry(self.left, font=('arial' , 20 , 'bold'),show='*')
- self.password_ent.place(x=750, y=420)
- # button to perform a command================================
- #button1
- self.login = Button(self.left,font=('arial' , 20 , 'bold'), text="LOGIN", bg='steelblue',command=self.login)
- self.login.place(x=700, y=480)
- b = Application(root)
- root.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement