from Tkinter import * import tkColorChooser v0=Tk() v0.title( 'Ventana principal' ) v0.config( bg = 'snow' ) v0.geometry( "200x500" ) def mostrar (num): v1=Toplevel(v0) v1.title( 'ventana hija' ) v1.protocol( 'wn_DELETE_WINDOW' , "onexit" ) v1.geometry( "300x400" ) if num == 1 : f1=Canvas(v1 , width = 200 , height = 200 , bg = 'white' ) f1.pack( expand =YES , fill =BOTH) #cuerpo f1.create_polygon( 110 , 50 , 190 , 50 , 190 , 130 , 230 , 130 , 230 , 250 , 190 , 250 , 190 , 330 , 110 , 330 , 110 , 250 , 70 , 250 , 70 , 130 , 110 , 130 , 110 , 50 , width = 10 , fill = 'tan1' ) #cara f1.create_polygon( 110 , 50 , 190 , 50 , 190 , 80 , 180 , 80 , 180 , 70 , 120 , 70 , 120 , 80 , 110 , 80 , 110 , 50 , width = 1 , fill = 'saddle brown' ) f1.create_polygon( 120 , 90 , 130 , 90 , 130 , 100 , 120 , 100 , 120 , 90 , width = 1 , f...
Comentarios
Publicar un comentario