Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何选择我的 Tkinter 列表框中的最后一项?
调用selection_clear()删除任何现有的选择,然后按selection_set("end")[2] 选择最后一个元素。您可能还需要调用see("end")以确保它已滚动到视图中。
selection_clear()
selection_set("end")
see("end")