def METHOD_NAME(self, event: tk.Event) -> None:
    if self.listbox.curselection():
        self.selected_index = self.listbox.curselection()[0]
        self.selected = self.listbox.get(self.selected_index)
        self.edit_button.config(state=tk.NORMAL)
        self.delete_button.config(state=tk.NORMAL)
    else:
        self.selected = None
        self.selected_index = None
        self.edit_button.config(state=tk.DISABLED)
        self.delete_button.config(state=tk.DISABLED)