Skip to content
Advertisement

Tkinter Python – how to set a command for a column

I want to create a table like this:

I want it to work such that when I click on “delete this record” it will delete that row of data. I am trying this code:

JavaScript

Advertisement

Answer

You can bind <ButtonRelease-1> on the treeview and then determine whether user has clicked on the required cells. If yes, ask for confirmation and delete the row:

JavaScript
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement