Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

span.checkbox #261

Open
Akselrud opened this issue Dec 31, 2024 · 1 comment
Open

span.checkbox #261

Akselrud opened this issue Dec 31, 2024 · 1 comment

Comments

@Akselrud
Copy link

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?

@ragardner
Copy link
Owner

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_function with a function of your own creation to be called when the checkbox is set by the user.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants