[Python] Treeview click selected row

Discussão em 'Python' iniciado por Stack, Junho 9, 2025.

  1. Stack

    Stack Membro Participativo

    def donorinfo(self, event):
    viewInfo = self.donor_records.focus()
    donordata = self.donor_records.item(viewInfo)
    row = donordata['values']

    self.benefactor_no_entry.set(row[0])
    self.first_name_entry.set(row[1]),
    self.last_name_entry.set(row[2]),
    self.middle_initial_entry.set(row[3]),
    self.contact_number_entry.set(row[4]),
    self.email_add_entry.set(row[5])


    Hello, can someone help me on how to display the selected database row when clicking it? I don't know why it doesn't work when I use

    self.donor_records.bind("<ButtonRelease-1>", self.donorinfo)

    Continue reading...

Compartilhe esta Página