Welcome to HBH! If you have tried to register and didn't get a verification email, please using the following link to resend the verification email.

Simple search menu - Python Code Bank


Simple search menu
Just a simple radio button to search a web site
                from Tkinter import *    
root    = Tk()
mbutton = Menubutton(root, text='Search')     # the pull-down stands alone
picks   = Menu(mbutton)               
mbutton.config(menu=picks)           
picks.add_command(label='Users',  command=root.quit)
picks.add_command(label='Forums',  command=root.quit)
picks.add_command(label='Articles', command=root.quit)
mbutton.pack()
mbutton.config(bg='white', bd=4, relief=RAISED)
root.mainloop()


            
Comments
ellipsis's avatar
ellipsis 11 years ago

There's no functionality here? I'm not sure why you didn't just use "import Tkinter" for the first line…it accomplishes the same thing. I'll rate good since it shows an example of the Tkinter library…but yeah. No functionality…