当Tkinter Listbox选择更改时获取回调? [英] Getting a callback when a Tkinter Listbox selection is changed?
本文介绍了当Tkinter Listbox选择更改时获取回调?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在Tkinter中,当 Text
或条目
小部件更改时,有许多方法可以获取回调,但是没有找到一个 Listbox
(它不会帮助我发现很多事件文档是旧的或不完整的)。是否有一些方法为此生成事件?
There are a number of ways of getting callbacks when Text
or Entry
widgets are changed in Tkinter, but I haven't found one for Listbox
's (it doesn't help that much of the event documentation I can find is old or incomplete). Is there some way of generating an event for this?
推荐答案
您可以绑定到:
<<ListboxSelect>>
这篇关于当Tkinter Listbox选择更改时获取回调?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文