now, how i get multiple check in the same time? i cant select 2 or 3 or 4 checkbox in the same time,it only allows me 1 select for time
def check_appointments():
print(var.get())
def checkbox():
contacto = Contacto()
arreglo = contacto.buscar(1)
m=2
n=1
for c in arreglo:
m=m+1
n=n+1
for r in range(n,m):
for co in range(1, 9):
if co==5:
cell = Entry(master, width=10,justify='center',font=("Calibri",11),disabledbackground="cadetblue",disabledforeground="black")
cell.grid(padx=1, pady=1, row=r, column=co)
t=add_date(c[4],1)
cell.insert(END,t)
else:
cell = Entry(master, width=15,justify='center',font=("Calibri",11),disabledbackground="cadetblue",disabledforeground="black")
cell.insert(END,c[co-1])
cell.grid(padx=1, pady=1, row=r, column=co)
cell.config (state = DISABLED )
cb = Checkbutton(master, command=check_appointments, variable=var, onvalue=c[0],offvalue="0")
cb.grid( row=r, column=0)
cb.deselect()
master=Tk()
var = StringVar()
cajaB = StringVar()
checkbox()
master.mainloop()
Aucun commentaire:
Enregistrer un commentaire