Skip to content

Commit ee9bf58

Browse files
authored
Update alarma.py
1 parent c81f213 commit ee9bf58

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

Alarma/alarma.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,18 @@
1919

2020
for i in range(0,24):
2121
lista_horas.append(i)
22-
2322
for i in range(0,60):
2423
lista_minutos.append(i)
25-
2624
for i in range(0,60):
2725
lista_segundos.append(i)
2826

29-
3027
texto1 = Label(ventana, text= 'Hora', bg= 'black', fg= 'magenta', font= ('Arial',12, 'bold'))
3128
texto1.grid(row=1, column=0, padx =5, pady=5)
3229
texto2 = Label(ventana, text= 'Minutos', bg= 'black', fg= 'magenta', font= ('Arial',12, 'bold'))
3330
texto2.grid(row=1, column=1, padx =5, pady=5)
3431
texto3 = Label(ventana, text= 'Segundos', bg= 'black', fg= 'magenta', font= ('Arial',12, 'bold'))
3532
texto3.grid(row=1, column=2, padx =5, pady=5)
3633

37-
3834
combobox1 = ttk.Combobox(ventana, values = lista_horas , style = "TCombobox", justify='center',width='12', font='Arial')
3935
combobox1.grid(row=2, column=0, padx =15, pady=5)
4036
combobox1.current(0)
@@ -45,7 +41,6 @@
4541
combobox3.grid(row=2, column=2, padx =15, pady=5)
4642
combobox3.current(0)
4743

48-
4944
style = ttk.Style()
5045
style.theme_create('combostyle', parent='alt',settings = {'TCombobox':
5146
{'configure':
@@ -60,7 +55,6 @@
6055
ventana.option_add('*TCombobox*Listbox*selectBackground', 'green2')
6156
ventana.option_add('*TCombobox*Listbox*selectForeground', 'black')
6257

63-
6458
alarma = Label(ventana, fg = 'violet', bg='black', font = ('Radioland', 20))
6559
alarma.grid(column=0, row=3, sticky="nsew", ipadx=5, ipady=20)
6660
repetir = Label(ventana, fg = 'white', bg='black', text = 'Repetir', font='Arial')
@@ -69,8 +63,6 @@
6963
cantidad.grid(row=3, column=2, padx =5, pady=5)
7064
cantidad.current(0)
7165

72-
73-
7466
def obtener_tiempo():
7567
x_hora = combobox1.get()
7668
x_minutos = combobox2.get()
@@ -83,10 +75,8 @@ def obtener_tiempo():
8375
hora_total = (hora + ' : '+ minutos+ ' : '+ segundos)
8476
texto_hora.config(text=hora_total, font = ('Radioland', 25))
8577

86-
8778
hora_alarma = x_hora +' : '+ x_minutos +' : '+ x_segundos
8879
alarma['text']= hora_alarma
89-
9080
#condicion:
9181
if int(hora) == int(x_hora):
9282
if int(minutos) == int(x_minutos):
@@ -96,11 +86,8 @@ def obtener_tiempo():
9686
messagebox.showinfo(message=hora_alarma, title="Alarma")
9787

9888
texto_hora.after(100, obtener_tiempo)
99-
100-
10189
texto_hora = Label(ventana, fg = 'green2', bg='black')
10290
texto_hora.grid(columnspan=3, row=0,sticky="nsew", ipadx=5, ipady=20)
103-
10491
obtener_tiempo()
10592

10693
ventana.mainloop()

0 commit comments

Comments
 (0)