tksheet
tksheet copied to clipboard
span.checkbox
I created a span.checkbox (Grid1 is Sheet):
span = Grid1[i1, i2]
span.checkbox(checked=False, text = "2025")
How do I get the values of i1, i2 when clicking on the checkbox with the mouse, which gives checked=True?
Hello,
As a quick example and going by your example, you could do the following:
values = span.data
But I have also updated the docs for more info on the topic which you can find below, specifically under the Notes section:
https://github.com/ragardner/tksheet/wiki/Version-7#using-a-span-to-create-check-boxes
Notes:
- To get the current checkbox value either: - Get the cell data, more information here. - Use the parameter
check_functionwith a function of your own creation to be called when the checkbox is set by the user.