How can I change the text of Listbox item?

后端 未结 2 676
迷失自我
迷失自我 2021-01-12 09:50

I have a Listbox full of items, and I need to change an item\'s text. Using item configure I can only find out how to change colors.

How can I change t

2条回答
  •  心在旅途
    2021-01-12 10:04

    You have first to delete the old item (specifying its index), using the delete method of your Listbox object:

    myList.delete(index, old_item)
    

    and then insert your updated_item at position of you old item:

    myList.insert(index, updated_item)
    

提交回复
热议问题