Hello!!
Context: Treeview with multiple-selection enabled.
Problem: pressing the Enter
key DEselects all rows except for the last-selected one
Evidence:
- In the GUI only one row remains selected
- Inside the
row_actived
callback, counting the number of selected row(s) returns = 1 (see code below).
# This is the Treeview `row_activated` callback
def treeview_on_row_activated(self, treeview, row_path, treeviewcolumn):
treeselection = treeview.get_selection()
model, pathlist = treeselection.get_selected_rows()
if pathlist:
print("Number of selected row(s): " + str(len(pathlist)))
for path in pathlist:
# do something on all the selected rows
I don’t want to loose the information about the selected rows when I click the Enter
key. Instead I would like to perform some action on ALL the previously selected rows (not only the last-selected one).