楼主:
neil987 (R5大小姐-EX人品崩坏)
2017-05-22 06:37:36最近在用ttk 写一个爬虫
首先 有两个list:list_option_val,list_option_sub 长度一样
用ttk叫出了一个combobox给使用者选择
match = tk.StringVar()
matchChosen = ttk.Combobox(win, width=20, textvariable=match,
state='readonly')
matchChosen['values'] = list_option_sub
matchChosen.grid(column=0, row=1)
matchChosen.current(0)
print match.get()
基本上可以抓到使用者选择的内容
但是主要需要的是另一个list_option_val 对应字段的值
这值要丢给某些网址用的
请问有没有方法可以快速知道使用者选了第几项?
以方便我到另一个list取值
如果没有的话就只能在回去原本的list搜寻了QQ