Python Forum
[Tkinter] Radio Buttons Working Bassackwards
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Tkinter] Radio Buttons Working Bassackwards
#1
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?
Reply


Messages In This Thread
Radio Buttons Working Bassackwards - by gw1500se - Dec-06-2021, 07:07 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [Tkinter] Is there a way to determine if a radio button has been selected? TWB 5 5,837 Jan-31-2023, 09:44 AM
Last Post: Vadanane
  tkinter toggle buttons not working Nu2Python 26 7,896 Jan-23-2022, 06:49 PM
Last Post: Nu2Python
  [Tkinter] Grid the radio buttons Joni_Engr 6 5,170 Nov-24-2021, 07:20 PM
Last Post: menator01
  Radio butto to enable/disable combo box in Tkinter cybertooth 5 5,895 Oct-09-2021, 07:30 AM
Last Post: cybertooth
  problem with radio button crook79 3 4,002 Aug-12-2021, 02:30 PM
Last Post: deanhystad
  [Tkinter] I can't get information from a radio button aquerci 2 2,889 May-20-2020, 10:31 AM
Last Post: aquerci
  [Tkinter] Radio button help Muzz 5 3,887 Apr-28-2019, 07:43 AM
Last Post: Muzz

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020