0
をクリックしたときに、私はクラスの一部として、このリストボックスを持っている:のpython3 Tkinterの表示リストボックス項目は
def myListbox(self):
selection = Label(self, text="Please select Country").grid(row=0,column=0)
countries = Listbox(self, width = 20, height = 75)
countries.grid(row=0, column=1)
# I have a function that populates the country names from
# a text file and displays the names in the Listbox.
# I want to be able to select a country from the Listbox
# and have it displayed in a Label
country_display = Label(self, text = "").grid(row = 0, column = 9)
# this is where I'm not sure what code to use.
# my code is
countries.bind("<<ListboxSelect>>",country_display)
何も表示されていない現時点では。私はここで何が欠けていますか? ありがとう