我正在尝试打印选项菜单选项,如何操作?
def print_it(event):
print (var_suite)
var_suite = StringVar()
var_suite.set("Suite Selection")
suites = [name for name in os.listdir(".") if os.path.isdir(name)]
x = OptionMenu(root,var_suite,"All Suites", *suites, command=print_it)
x.grid(row=0,column=2)
x["menu"].config(bg="WHITE")