Dec-06-2021, 07:07 PM
I have the following radio buttons defined (sanitized):
myPhone=tk.StringVar() tk.Radiobutton(top,text='123-456-7932',variable=myPhone,value='123-456-7932').grid(row=rw,column=0,pady=5,columnspan=2) tk.Radiobutton(top,text='123-456-6305',variable=myPhone,value='123-456-6305').grid(row=rw,column=2,pady=5,columnspan=2) tk.Radiobutton(top,text='123-456-7477',variable=myPhone,value='123-456-7477').grid(row=rw,column=4,pady=5,columnspan=2) myPhone.set('123-456-7932')When they are displayed the 2nd and 3rd buttons show selected. In my mind that should be impossible as 'myPhone' can only have 1 value. It does not matter which number I 'set', the display is the same. What am I doing wrong?