title: how to disable the other two radiobuttons which bind to its own frame in tkinter
body: <p>I am designing a GUI with tkinter. There are three radio-buttons bind to each individual frame. Is it a way to disable the other two radio-buttons by clicking one of them? Or even better to disable the other two frame<a href="https://i.stack.imgur.com/5XwDN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5XwDN.png" alt="enter image description here"></a></p>
  
  <p>I am not able to achieve this feature. Below is part of the code. Please let me know if you need more information. Thanks</p>
  
  <pre class="lang-py prettyprint-override"><code>root = Tk()
  root.title("MyApp")   
  
  f1 = ttk.Frame(root, padding="3 3 12 12")
  f1.grid(row=0, sticky=(W, E, N, S))
  Label(f1, text = "Welcome to My App!", font=("Times New Roman", 20)).grid(column=3, row=1, sticky='EW')  
  
  
  root.rowconfigure(0, weight=1)
  root.columnconfigure(0, weight=1)
  
  option = StringVar()
  
  topframe=ttk.Frame(root, padding="3 3 12 12", relief = GROOVE, borderwidth = 10)
  topframe.grid(row=1, sticky=(W, E, N, S))
  
  mainframe = ttk.Frame(root, padding="3 3 12 12",  relief = GROOVE, borderwidth = 10)
  mainframe.grid(row=2, sticky=(W, E, N, S))
  
  bottomframe = ttk.Frame(root, padding="3 3 12 12", relief = GROOVE, borderwidth = 10)
  bottomframe.grid(row=3, sticky=(W, E, N, S))
  
  paraframe = ttk.Frame(root, padding="3 3 12 12" , relief = GROOVE, borderwidth = 10)
  paraframe.grid(row=4, sticky=(W, E, N, S))
  
  
  
  rb1 = Radiobutton(topframe, text="Select Files", value="files", var=option)
  rb1.grid(column=0, columnspan=2, row=0, sticky=W)
  
  rb2 = Radiobutton(mainframe, text="Select a Directory", value="directory", var=option)
  rb2.grid(column=0,columnspan=2, row=0,sticky=W)
  
  rb3 = Radiobutton(bottomframe, text="Paste a JSON File", value="json", var=option)
  rb3.grid(column=0,columnspan=2, row=0,sticky=W)
  
  # function to gray out
  def greyOutNotTop():
      if option.get() == "files":
          rb2.config(state='disable')
          rb3.config(state='disable')
  
  def greyOutNotMain():
      if option.get() == "directory":
          rb1.config(state='disable')
          rb3.config(state='disable')
  def greyOutNotBottom():
      if option.get() == "json":
          rb1.config(state='disable')
          rb2.config(state='disable')
  
  root.mainloop()
  </code></pre>