Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from tkinter import *
- from tkinter import messagebox
- class Window(Frame):
- def __init__(self, master=None):
- Frame.__init__(self, master)
- self.master = master
- self.init_window()
- def init_window(self):
- top = Tk("Hello")
- L1 = Label(top, text="User Name")
- L1.pack( side = LEFT)
- E1 = Entry(top, bd =5)
- E1.pack(side = RIGHT)
- label = Message( self, text="last update 25/02/17 13:58", relief=RAISED, bg="#72726a", borderwidth=0, highlightthickness=0)
- label.pack()
- label.place(x=100,y=800)
- self.master.title("EZ-MEAL")
- self.configure(background = "#72726a")
- self.pack(fill=BOTH, expand=10)
- logo = PhotoImage(file="Capture.gif")
- w1 = Label(self, image=logo, borderwidth=0, highlightthickness=0)
- w1.image = logo
- w1.pack()
- w1.place(x=700,y=400)
- quitButton = Button(self, text="Exit",command=self.client_exit, height= 5 , width =15, bg = "#e0b93a" , fg = "black")
- quitButton.place(x=700, y=700)
- AcceptButton = Button(self, text="Accept Order",command =self.OrderAcceptedNotification, height= 5 , width =25, bg = "#e0b93a" , fg = "black")
- AcceptButton.place(x=300, y=200)
- orderisreadyButton = Button(self, text="Order is ready",command =self.OrderisreadyNotification, height= 5 , width =25, bg = "#e0b93a" , fg = "black")
- orderisreadyButton.place(x=500, y=200)
- listbox1 = Listbox(self,height =30, width =25,bg = "beige")
- listbox1.pack()
- listbox1.insert(1,"Number of the Order:")
- listbox1.place (x=100,y=300)
- listbox2 = Listbox(self,height =30, width =25, bg = "beige")
- listbox2.pack()
- listbox2.insert(1,"type of food:")
- listbox2.place (x=300,y=300)
- listbox3 = Listbox(self,height =30, width =25, bg = "beige")
- listbox3.pack()
- listbox3.insert(1,"cost of order:")
- listbox3.place (x=500,y=300)
- w = Label(self, text="Ez meal APP version 0.00.03", bg="red", fg="white")
- w.pack(side= TOP ,fill=X)
- def OrderAcceptedNotification(self):
- msg = messagebox.showinfo( "OrderAccepted", "you accepted the last order")
- def OrderisreadyNotification(self):
- msg = messagebox.showinfo( "OrderisReady", " You sent order ")
- def client_exit(self):
- exit()
- root = Tk()
- root.geometry("1000x1000")
- app = Window(root)
- root.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement