# -*- coding: utf-8 -*-
from Tkinter import *
import Tkinter as tk
raiz=Tk()
raiz.title("ventana primaria")
raiz.resizable(1,1) #para permitir agrandar o no el ancho o la altura con el moyuse
raiz.iconbitmap("Hamburger.ico")
#raiz.geometry("500x600")
raiz.config(bg="orange")
raiz.config(bd=15)
raiz.config(relief="groove")
miFrame=Frame(raiz)
miFrame.pack()
miFrame.config(bg="yellow")
miFrame.config(bd=10)
miFrame.config(relief="sunken")
miFrame.config(cursor="hand2")
#Etiquetas
miLabel1=Label(miFrame, text="Hamburguesa feliz", fg="red",bg="yellow",font=("Arial Black",25)).grid(row=0,column=0,pady="4")
OrdenH=Label(miFrame, text="Seleccione la hamburguesa", bg="yellow",font=("Arial",14)).grid(row=1,column=0,pady="1",padx="15", sticky="w")
Pedido=Label(miFrame, text="Pedido:", bg="yellow",font=("Arial",14)).grid(row=1,column=2,pady="1")
cantidadhamb=Label(miFrame, text="Cantidad de Hamburguesas:", bg="yellow",font=("Arial",14)).grid(row=2,column=0,pady="1",padx="15", sticky="w")
complementos=Label(miFrame, text="Complementos:", bg="yellow",font=("Arial",14)).grid(row=3,column=0,pady="1",padx="15", sticky="w")
Cantidadcomp=Label(miFrame, text="Cantidad complementos:", bg="yellow",font=("Arial",14)).grid(row=3,column=1,pady="1",padx="15", sticky="w")
Formadepago=Label(miFrame, text="Forma de pago:", bg="yellow",font=("Arial",14)).grid(row=7,column=0,pady="1",padx="15", sticky="w")
Total=Label(miFrame, text="Total:", bg="yellow",font=("Arial",14)).grid(row=7,column=1,pady="1",padx="15", sticky="w")
rtotal=Label(miFrame, text="_", bg="yellow",font=("Arial",14)).grid(row=7,column=2,pady="1",padx="15", sticky="w")
IVA=Label(miFrame, text="IVA:", bg="yellow",font=("Arial",14)).grid(row=8,column=1,pady="1",padx="15", sticky="w")
riva=Label(miFrame, text="_", bg="yellow",font=("Arial",14)).grid(row=8,column=2,pady="1",padx="15", sticky="w")
TotalFinal=Label(miFrame, text="Total final:", bg="yellow",font=("Arial",14)).grid(row=9,column=1,pady="1",padx="15", sticky="w")
rtotalfinal=Label(miFrame, text="_", bg="yellow",font=("Arial",14)).grid(row=9,column=2,pady="1",padx="15", sticky="w")
#Lista de opciones despegable
var1=tk.StringVar(miFrame)
var1.set("No ha selecionado")
opciones=["Hamburguesa sencilla","Hamburguesa Doble","Hamburguesa triple"]
opcion=tk.OptionMenu(miFrame,var1,*opciones)
opcion.config(width=20)
opcion.grid(row=1,column=1)
#Listbox
listpedido=Listbox(miFrame, width=50).grid(row=2,column=2,pady="1",padx="4")
#Entrys
cuadrohamb=Entry(miFrame )
cuadrohamb.grid(row=2,column=1,pady="1")
cuadrohamb.config(fg="blue", justify="center")
cuadrorefresco=Entry(miFrame )
cuadrorefresco.grid(row=4,column=1,pady="1")
cuadrorefresco.config(fg="blue", justify="center")
cuadropapas=Entry(miFrame )
cuadropapas.grid(row=5,column=1,pady="1")
cuadropapas.config(fg="blue", justify="center")
cuadroburrito=Entry(miFrame )
cuadroburrito.grid(row=6,column=1,pady="1")
cuadroburrito.config(fg="blue", justify="center")
#Checkbutton
CheckVar1=IntVar()
CheckVar2=IntVar()
CheckVar3=IntVar()
Refresco=Checkbutton(miFrame,text="Refresco",bg="yellow", variable=CheckVar1)
Refresco.grid(row=4,column=0, sticky="w",padx="15")
Refresco.config(onvalue=1, offvalue=0)
Papas=Checkbutton(miFrame,text="Papas", bg="yellow",variable=CheckVar2)
Papas.grid(row=5,column=0, sticky="w",padx="15")
Papas.config(onvalue=1, offvalue=0)
Burrito=Checkbutton(miFrame,text="Burrito",bg="yellow", variable=CheckVar3)
Burrito.grid(row=6,column=0, sticky="w",padx="15")
Burrito.config(onvalue=1, offvalue=0)
#Radiobutton
var = IntVar()
R1 = Radiobutton(miFrame, text="Tarjeta de credito",bg="yellow", variable=var, value=1)#, command=sel)
R1.grid(row=8,column=0, sticky="w",padx="15")
R2 = Radiobutton(miFrame, text="Efectivo",bg="yellow", variable=var, value=2) #, command=sel)
R2.grid(row=9,column=0, sticky="w",padx="15")
#botones
Cancelar=Button(miFrame, text= "Cancelar")
Cancelar.grid(row=10,column=0, sticky="w",padx="15")
Comprar=Button(miFrame, text= "Hacer pedido")
Comprar.grid(row=10,column=2, sticky="e",padx="15")
Terminar=Button(raiz, text= "Terminar")
Terminar.pack()
raiz.mainloop()
Comentarios
Publicar un comentario