from Tkinter import * ventana = Tk() ventana.title("Poligono") ventana.config(bg="orange") ventana.geometry("500x500") def ejecutar(f): ventana.after(200,f) def poligono(ventana): poligono= Canvas(width=400, height=400, bg="gray") poligono.create_polygon(130,20,60,80,100,140,160,140,200,80,width=3, fill="pink", outline="black") poligono.pack() boton = Button(ventana, text = "Mostar Poligono", command=lambda: ejecutar(poligono(ventana))) boton.pack() ventana.mainloop()
Ejecución del programa |
No hay comentarios:
Publicar un comentario