tkinter import messagebox as msg
window = Tk()
var = StringVar()
L1=Label(window, text="Customer Name :", width =15)
L1.grid(column=0, row=0)
E1 = Entry(window, font=("Arial Black", 12))
E1.grid(column=1,row=0)
window.title("Pizza Place")
window.geometry("600x500")
v0 = IntVar()
v0 = IntVar()
v0 = IntVar()
v0 = IntVar()
v0.set(1)
v0.set(2)
v0.set(3)
v0.set(4)
r1 = Radiobutton(window, text="Pizza Size", variable=v0, value=1).grid(column=0, row=2)
r2 = Radiobutton(window, text="Small", variable=v0, value=2).grid(column=1, row=2)
r1 = Radiobutton(window, text="Medium", variable=v0, value=3).grid(column=2, row=2)
r2 = Radiobutton(window, text="Large", variable=v0, value=4).grid(column=3, row=2)
v1 = IntVar()
v2 = IntVar()
v3 = IntVar()
v4 = IntVar()
v0.set(1)
v0.set(2)
v0.set(3)
v0.set(4)
C1 = Checkbutton(window, text="Extras", variable=v1).grid(column=0, row=3)
C2 = Checkbutton(window, text="BreakSticks", variable=v2).grid(column=1,row=3)
C1 = Checkbutton(window, text="Salad", variable=v3).grid(column=2, row=3)
C2 = Checkbutton(window, text="Soda", variable=v4).grid( column=3, row=3)
var.set("one")
Toppings = ("Pepperoni", "Sausage", "Green Peppers", "Onions", "Tomatoes", "Anchovies")
cb = Combobox(window, values=Toppings)
cb.grid(column=0, row=6)
lb = Listbox(window, height=8, selectmode="multiple")
for num in Toppings:
lb.insert(END, num)
lb.grid(column=1, row=6)
var.set("one")
CrustType = ("Thin", "Deep Dish")
cb = Combobox(window, values=CrustType)
cb.grid(column=0, row=7)
lb = Listbox(window, height=3, selectmode='multiple')
for num in CrustType:
lb.insert(END, num)
lb.grid( column=1, row=7)
L2 = Label(window, text="Order Comments : ", width=25)
L2.grid(column=0, row=14)
E2 = Entry(window, font=("Arial Black", 20))
E2.grid(column=1, row=14)
def click():
print("Show Information !")
B1 = Button(window, text="Place Order", font=40, bg="green")
B1.config(command="Click")
B1.grid(column=0, row=15)
B2 = Button(window, text="Reset Values", font=40, bg="red")
B2.config(command="Click")
B2.grid(column=1, row=15)
class Root(Tk):
def __init__(self):
super (Root, self) .__init__()
self.title ("Python Tkinter Message Box")
self.minsize (640, 400)
self.wm_iconbitmap ('icon. ico')
self.msgButton ()
def msgButton (self):
self.btn = ttk.Button (self, text = "Open Message Box")
self.btn.grid (column = 0, row = 0)
def infoMsgBox(self):
msg.showinfo("python Message info", "python GUI Created By Tkinter")
window.mainloop()
Can anyone help please . ? I could not show the information for ordering a pizza ( its been 3 days working with this cod ))😥😰
To post more than a few lines of code, use a pastebin like: * dpaste.org * linkode.org * bin.kv2.dev * hastebin.com If you are stuck in a terminal, you can use ix.io or paste.rs to paste from the CLI: <command to print output> |& curl -F 'f:1=<-' ix.io <command to print output> |& curl --data-binary @- https://paste.rs
He's writing in Java
its python code, so confusing 😰😰
Whenever a function has more than 50 lines, it's a mess
can anyone help please, could not find the missing 😰😰
Обсуждают сегодня