ragardner / tksheet

Python tkinter table widget for displaying tabular data
https://pypi.org/project/tksheet/
MIT License
408 stars 50 forks source link

Manually set displayed row index #202

Closed morgan-dgk closed 1 year ago

morgan-dgk commented 1 year ago

I have a simple paginated table, using display rows to show 25 rows of the data at a time. However, I have been unable to figure out how to set the displayed row index, which always shows 1-25.

I have tried setting setting sheet.index and sheet.row_index, as well as calling row_index() using either the newindex or index arguments. What am I missing here?

ragardner commented 1 year ago

Hello, thanks for the report and sorry it’s not working as expected

I’m away from my computer at the moment but I suspect this will require a patch which I’ll work on tomorrow

morgan-dgk commented 1 year ago

No problem, thanks for all your hard work! I will poke around the code a bit and see if I can dig anything further up.

ragardner commented 1 year ago

It should be fixed in 6.2.7. The headers already behaved in the expected way by default so I labelled it as a bug.

You won't need to use row_index() to change the index unless you want to make it display a specific column or give it a list of values for it to display, it should show the true row numbers now