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

Editing the row index? #3

Closed
alvferhid opened this issue Nov 19, 2019 · 1 comment
Closed

Editing the row index? #3

alvferhid opened this issue Nov 19, 2019 · 1 comment

Comments

@alvferhid
Copy link

First of all, thank you for creating this widget! I'm still a big noob, I just started coding less than 6 months ago and this is just perfect of an appointments app I'm creating for a dentist clinic. The only thing I'd like to know is if I can find documentation about if it's possible to edit the row index because I want to change them from "1","2","3"... to display hours, but doesn't matter what I do, I can't edit it.

Thank you so much and sorry if I'm asking something too stupid.

@ragardner
Copy link
Owner

ragardner commented Nov 22, 2019

edit: minor correction in the code

Unfortunately at the moment you cannot directly edit the row index once your program is running, like you would a cell by pressing F2 or something... BUT! You can get your program to display something else in the row index by using the function row_index() on your tksheet widget

To get one of your columns to show in the row index you can use an integer representing the position of the column you want to show, e.g. the first column would be 0 the second column would be 1

mysheet.row_index(newindex = 0)

To put a completely new set of values in the row index you can use the same command but with a Python list or tuple:

mysheet.row_index(newindex = ["my row index values example 1", "my row index values example 2"])

At some point I will get around to writing more documentation...

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