0
我一直在四处搜寻,我无法找到Tkinter中OptionMenu语法的正确解释。Python 3 Tkinter OptionsMenu
我将如何获得OptionMenu中当前选择的选项?
def homeTeamOption(self, frame, sortedList):
def func():
print(homeTeamName)
return
homeTeam = tk.StringVar(frame)
returnValueAwayTeam = []
options = sortedList
homeTeamName = tk.StringVar()
drop = OptionMenu(frame, homeTeamName, *options, command=func())
drop.place(x=200, y= 100, anchor="nw")