1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| def commandcontact(self):
self.entrycontact1 = Tk.Entry(self.fenetre_contact, width=40, state='disable')
self.entrycontact1.grid(row=5, column=2, sticky='w')
self.radio_contact = Tk.IntVar() ##c'est ici que ca bug
radiocontact1 = Tk.Radiobutton(self.fenetre_contact, text=' Oui ', variable= self.radio_contact, value=1, command = self.entry_change)
radiocontact1.grid(row=4, column=2, sticky='w')
radiocontact2 = Tk.Radiobutton(self.fenetre_contact, text=' Non ', variable= self.radio_contact, value=2, command = self.entry_change)
radiocontact2.grid(row=4, column=2, sticky='n')
def entry_change (self):
entry_selection = self.radio_contact.get()
print entry_selection |
Partager