This is a first draft of what you might want. The radiobutton has a 'command' feature that allows you to supply a callback when it is activated, so I eliminated the need for a separate class. The only problem with this so far is that you can't supply a target, but I know how to fix that. See if you understand this first and whether it's along the lines of what you are trying for:
from Tkinter import *
def disable():
print "disabling"
root.button['state'] = DISABLED
def enable():
print "enabling"
root.button['state'] = ACTIVE
def button_com():
print "hi"
root = Tk()
root.input_text = Text(root, height = 10, width = 25)
root.input_text.grid(row = 1, column = 1, sticky = N+S+E+W)
root.mainbar_menu = Menu(root)
root.input_menu = Menu(root.mainbar_menu)
root.mainbar_menu.add_cascade(label='Input Options', menu = root.input_menu)
root.button = Button(root, text="Swill", command = button_com)
root.button.grid()
root.input_menu.add_radiobutton(label='Input From File', command=disable)
root.input_menu.add_radiobutton(label='Input from Pipe', command=enable)
root.input_menu.add_radiobutton(label='Input from Stream', command=enable)
root.config(menu=root.mainbar_menu)
root.mainloop()
Last edited by jrcagle : Sep 11th, 2007 at 9:49 pm.