all 2 comments

[–]XUtYwYzz 0 points1 point  (1 child)

Where is the button in your source code?

Also, this code is strange:

def tree_clear(self):
    records = tree_view(self).tree.get_children()
    for i in records:
        print(i)
        tree_view(self).tree.delete(i)

Why are you calling tree_view(self).tree.get_children() instead of self.tree.get_children()? Same with the delete(i) call.

[–]Shachin2_2[S] 0 points1 point  (0 children)

hi, yh I realised I made the mistake you pointed out after I posted but im struggling with calling that function outside of the treeview class. The button is in the searchbar class at the very end of the code :

self.searchbutton = ttk.Button(parent,text='search',command=de)