Akascape / CTkTable

Customtkinter Table widget (extension/add-on)
MIT License
281 stars 16 forks source link

issue in using command keyword #8

Closed ghost closed 1 year ago

ghost commented 1 year ago

can you give a example how to use the command attribute of the table, i am getting a error like this

TypeError: customtkinter.windows.widgets.ctk_button.CTkButton() got multiple values for keyword argument 'command'

what i want is if a cell is pressed it deletes the entire row relates to the cell my code - def function(): do some stuff create table table.configure(command=lambda: remove_item(table)

def remove_item(table): table.delete_row()

Akascape commented 1 year ago

@Gaurav-Upreti-2006 You should use the command like this https://github.com/Akascape/CTkTable/issues/6 Command actually returns a value, so you have to take that value in the function as an argument

ghost commented 1 year ago

thank you man