Entradas

Mostrando las entradas de septiembre, 2017

Recopilacion de figuras

Imagen
from Tkinter import * v0 = Tk() v0.config( bg = "black" ) v0.geometry( "900x500" ) def circulo(): v1 = Toplevel(v0) v1.deiconify() circulo = Canvas(v1, width = 210 , height = 210 , bg = 'red' ) circulo.pack( expand =YES, fill =BOTH) circulo.create_oval( 10 , 10 , 200 , 200 , width = 3 , fill = 'blue' ) b4 = Button(v1, text = "Cerrar circulo" , command = lambda : v1.destroy()) b4.pack() def rectangulo(): v1 = Toplevel(v0) v1.deiconify() rectangulo = Canvas(v1, width = 210 , height = 210 , bg = 'white' ) rectangulo.pack( expand =YES, fill =BOTH) rectangulo.create_rectangle( 10 , 10 , 200 , 200 , width = 5 , fill = 'yellow' ) b4 = Button(v1, text = "Cerrar rectangulo" , command = lambda : v1.destroy()) b4.pack() def lineas(): v1 = Toplevel(v0) v1.deiconify() linea = Canvas(v1, width = 210 , height = 210 , bg = 'white' ) linea.pack(