ttkbootstrap
ttkbootstrap copied to clipboard
Add selection_changed event to TableView
Is your feature request related to a problem? Please describe.
I have a need for responding when table selection changes, such as updating a num selected label.
Describe the solution you'd like
A bindable event for when table selection changes.
Describe alternatives you've considered
Other features I've considered are embedding a check button inside a table element to select a row. This did not work as I expected, but I figured an event would be much more versatile.
Additional context
No response
Binding Button-1
and KeyRelease
on tableview.view
, I have found that getting the selection does not work as expected on the first event. I've tried using tableview.view.update
then tableview.view.selection()
to no avail. Getting the selection requires clicking twice. See below GIF.
I've also noticed that tableview.insert_row("end", ["value1", "value2", "value3"])
does not work, at least on 3.12. tableview.view.insert_row()
does work as expected.