I am working on a script with tkinter, but something weird is happening.
I have two radioButtons:
way=False
RadioButton0=Radiobutton(root,text="From",variable=way,value=False)
RadioButton1=Radiobutton(root,text="To",variable=way,value=True)
RadioButton0.grid(column=0,row=2)
RadioButton1.grid(column=1,row=2)
And a text entry field:
entryValue=0
entryField=Entry(root,textvariable=entryValue)
entryField.grid(column=0,row=4)
When I enter 0 in entry field, RadioButton0 is automatically selected, when I enter 1, RadioButton1 is selected and for any other value, they both get selected...
This works vice versa: when I select RadioButton0, entry field changes to 0 and when I select RadioButton1, entry field changes to 1... Also, entryValue is later seen as 0. Variable way should only be modified by radio buttons...
Why is that happening? Am I doing something I shouldn't? And how do I fix it?