@@ -27,23 +27,20 @@ def __init__(self, master):
2727 self .widgets ()
2828 self .master .columnconfigure (0 , weight = 1 )
2929 self .master .rowconfigure (0 , weight = 1 )
30-
30+
3131 def widgets (self ):
3232 menu = Menu (self .master )
3333 self .master .config (menu = menu )
34-
3534 archivo = Menu (menu , tearoff = 0 )
3635 archivo .add_command (label = "Nuevo" , command = self .nueva_ventana )
3736 archivo .add_command (label = "Ventana Nueva" , command = self .segunda_ventana )
3837 archivo .add_command (label = "Abrir..." , command = self .abrir_archivo )
3938 archivo .add_command (label = "Guardar" , command = self .guardar_archivo )
4039 archivo .add_separator ()
4140 archivo .add_command (label = "Salir" , command = self .master .quit )
42-
4341 edicion = Menu (menu , tearoff = 0 )
4442 edicion .add_command (label = "Deshacer" , command = lambda : self .texto .edit_undo ())
45- edicion .add_separator ()
46-
43+ edicion .add_separator ()
4744
4845 edicion .add_command (label = "Cortar" , accelerator = 'Ctrl+X' ,
4946 command = lambda : self .master .focus_get ().event_generate ("<<Cut>>" ) )
@@ -53,33 +50,27 @@ def widgets(self):
5350 command = lambda : self .master .focus_get ().event_generate ("<<Paste>>" ))
5451 edicion .add_command (label = "Eliminar" , accelerator = 'Supr' ,
5552 command = lambda : self .master .focus_get ().event_generate ("<<Clear>>" ))
56-
5753 formato = Menu (menu , tearoff = 0 )
5854 formato .add_checkbutton (label = "Ajustes de linea" , variable = self .señal_ajustes , command = self .ajustes_de_linea )
5955 formato .add_command (label = "Fuente" , command = self .formato_fuente )
6056 formato .add_command (label = "Color de texto" , command = self .elegir_color_texto )
6157 formato .add_command (label = "Color de fondo" , command = self .elegir_color_fondo )
62-
6358 ver = Menu (menu , tearoff = 0 )
6459 submenu = Menu (menu , tearoff = 0 )
6560 submenu .add_command (label = "Acercar" , command = self .zoom_mas )
6661 submenu .add_command (label = "Alejar" , command = self .zoom_menos )
6762 submenu .add_command (label = "Restaurar Zoom" , command = lambda : self .texto .config (font = (self .f , 12 )))
68-
6963 ver .add_cascade (label = "Zoom" , menu = submenu )
7064 ver .add_checkbutton (label = "Barra de estado" , variable = self .info_estado , command = self .barra_de_estado )
71-
7265 ayuda = Menu (menu , tearoff = 0 )
7366 ayuda .add_command (label = "Ver la ayuda" )
7467 ayuda .add_separator ()
7568 ayuda .add_command (label = "Acerca del Bloc de notas" , command = self .acerca_de )
76-
7769 menu .add_cascade (label = "Archivo" , menu = archivo )
7870 menu .add_cascade (label = "Edicion" , menu = edicion )
7971 menu .add_cascade (label = "Formato" , menu = formato )
8072 menu .add_cascade (label = "Ver" , menu = ver )
8173 menu .add_cascade (label = "Ayuda" , menu = ayuda )
82-
8374 self .texto = Text (self .master , font = ('Arial' , 12 ), undo = True , insertbackground = 'red' )
8475 self .texto .grid (column = 0 , row = 0 , sticky = 'nsew' )
8576 ladox = Scrollbar (self .master , orient = 'horizontal' , command = self .texto .xview )
@@ -88,7 +79,6 @@ def widgets(self):
8879 ladoy .grid (column = 1 , row = 0 , sticky = 'ns' )
8980 self .texto .configure (xscrollcommand = ladox .set , yscrollcommand = ladoy .set )
9081 self .barra_estado = Label (self .master , font = ('Segoe UI Symbol' , 10 ))
91-
9282 #eventos
9383 self .master .bind ('<Shift-KeyPress-S>' , self .salir )
9484
0 commit comments