tkinter listbox get(ACTIVE) method

前端 未结 5 1094
耶瑟儿~
耶瑟儿~ 2020-12-15 05:19

I was trying to make the currently selected Listbox item to be printed out. For example, when I select item "one", it should print out "one"

5条回答
  •  攒了一身酷
    2020-12-15 05:53

    This seems to work for me:

    mylistbox.get(ANCHOR)
    

    Based on your code, it will print out the current item.

提交回复
热议问题