Untitled

mail@pastecode.io avatar
unknown
plain_text
2 months ago
380 B
2
Indexable
Never
def on_tree_click(self, event):
    x, y, widget = event.x, event.y, event.widget
    if widget == self.tree:  # Check if click occurs within the treeview
        item = widget.identify_row(y)
        if not item:
            self.tree.selection_remove(self.tree.selection())
    else:  # Click occurs outside the treeview
        self.tree.selection_remove(self.tree.selection())
Leave a Comment