Radio Button Menu
|
|
from Tkinter import *
class TestMenu: def __init__(self, master): self.master = master self.menubar = Menu(self.master)
self.radmenu = Menu(self.menubar) self.radmenu.add_radiobutton(label='A') self.radmenu.add_radiobutton(label='B') self.radmenu.add_radiobutton(label='C') self.radmenu.add_radiobutton(label='D') self.radmenu.add_radiobutton(label='E') self.radmenu.add_radiobutton(label='F') self.radmenu.add_radiobutton(label='G') self.radmenu.add_radiobutton(label='H') self.radmenu.add_radiobutton(label='I')
self.menubar.add_cascade(label="Radiobutton Menu", menu=self.radmenu)
self.top = Toplevel(menu=self.menubar, width=500, relief=RAISED, borderwidth=2)
def main(): root = Tk() root.withdraw() app = TestMenu(root) root.mainloop()
if __name__ == '__main__': main()
|
|
|
|
|
Related Scripts with Example Source Code in same category :
-
|
|