[Tutor] Radiobuttons (two options out of 4)

2017-03-03 Thread Pooja Bhalode
Hi, I am trying to create a GUI with four options out of which the user is supposed to select two. But once the user selected two out of those four options, the others need to get greyed out at that instant. I tried the following thing: *Label(lom, text = "Choose two options from:").grid(row = 9

Re: [Tutor] Radiobuttons (two options out of 4)

2017-03-03 Thread Alan Gauld via Tutor
On 03/03/17 16:43, Pooja Bhalode wrote: > I am trying to create a GUI with four options out of which the user is > supposed to select two. But once the user selected two out of those four > options, the others need to get greyed out at that instant. > > I tried the following thing: > > *Label(lo

Re: [Tutor] Radiobuttons (two options out of 4)

2017-03-03 Thread Pooja Bhalode
Hi Alan, Thank you for letting me know. I tried putting in the event handlers for the checkbuttons as shown below. num = 0 def selfcheck(event): print "Self Check" num = num + 1 if num == 2: check1butt.config(state = 'disabled') check2butt.config(state = 'disabled') check3butt.con

Re: [Tutor] Radiobuttons (two options out of 4)

2017-03-03 Thread Alan Gauld via Tutor
On 03/03/17 20:59, Pooja Bhalode wrote: > I tried putting in the event handlers for the checkbuttons as shown below. > > num = 0 > def selfcheck(event): > print "Self Check" > num = num + 1 > if num == 2: You need num to be inside the function since it needs to be reset to zero on