I added a OptionMenu
widget to my code, and assigned a list as it's options. This is how it is:
z = StringVar()
z.set(userList[0])
usersOption = OptionMenu(frame1, z, *userList)#, command=changeUser)
usersOption.pack(side=RIGHT, padx=3)
Now, I reckon it would show all the options in said list. As so:
Option 1 \/ <-- the box with the selected option
Option 1 }\__the options that show on click
Option 2 }/
but it actually only shows the second option, and when I choose it there is, basically, no way back, if I click the box again it keeps only showing option 2 and I can't change it even with the up and down keys. I tried looking for solutions, but I got nowhere, so I'm starting to think it is the default operating way of the widget, but I found nothing to show me how to solve it in the documentation I read.
P.S.: I'm using Python 3.3
z
an instance of a TkinterStringVar
? Are you absolutely certain thatuserlist
has the value you think it has? – Elwandaelwee