ragardner / tksheet

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

'end_edit_cell' with 'Return' key as 'Tab' key #246

Closed fmerchan65 closed 3 months ago

fmerchan65 commented 3 months ago

I have a Sheet table where the end user is going to use a lot numeric keyboard. So they use the Return key to move to the next cell more than 'Tab' key. I modified tab_bindings (associating 'Tab' and 'Return' keys) and it is running ok if they just are moving in the table to the one cell to next. But if they edit the cell and they use 'Return' to move to the next one, the selection moves to the cell just bellow. How could I change it to move after exit of editing cell with 'Return' to next cell in the same row like the 'Tab' key does?

ragardner commented 3 months ago

In version 7.2.14 I have added a way to change the behaviour of tab and return on edit cell

In your sheet initialization you can use the parameters:

With the following arguments:

e.g. my_sheet = Sheet(parent, edit_cell_return="right")

You can also use the keyword arguments with the set_options() function

fmerchan65 commented 3 months ago

It's runs ok with this option. Thanks a lot !