ttk.treeview.focus() returns the iid of a single line. The treeview box allows you to select multiple lines. How do I get a list of iids for the selected lines?
ttk.treeview.focus() returns the current focus item. That means the item that was last selected. The function you are looking for is ttk.treeview.selection(). This returns a tuple of the selected items.
Tk Treeview Focus(). How do I Get Multiple Selected Lines?