strange option menu behavior

Chad Netzer cnetzer at mail.arc.nasa.gov
Tue Oct 8 22:02:31 CEST 2002


On Tuesday 08 October 2002 03:15, Heiner Litz wrote:
> HI there!
>
> I implemented a option menu like this:
>
>     var=Tkinter.StringVar()
>     var.set("adjective")
>     option=Tkinter.OptionMenu(framenewentry3, var, "adjective", "adverb",
> "compound", "conjunction")
>     option.pack()

Works for me:

~~~~~~~~~~~~~~~
import Tkinter
root=Tkinter.Tk()
var=Tkinter.StringVar()
var.set("adjective")
option=Tkinter.OptionMenu(root, var,
                          "adjective", "adverb",
                          "compound", "conjunction")
option.pack()
root.mainloop()
~~~~~~~~~~~~~~~~

You are running the mainloop(), right?

-- 

Chad Netzer
cnetzer at mail.arc.nasa.gov




More information about the Python-list mailing list