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")