-
Notifications
You must be signed in to change notification settings - Fork 52
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
when use arrow key move to left , cursor jumping to the first column) #267
Comments
Hello, thanks for your report I'm sorry to say I cannot re-create this behavior, could you provide more detail please. These are the things I've tried just now with your above code:
Kind regards |
I get the same behaviour as described by Vichai1877.
|
Apologies, I discovered it was scrolling to put the selected column on the right hand side of the view when selecting a column that was not totally visible. The code for the arrow key functions is also very poor, fixes and refactoring incoming soon. Kind regards and thank you for raising the issue |
- Removed pre-commit due to issues with python version mismatch
Hello, The issue should be resolved now in 7.4.5 but let me know if you have further issues |
Thanks for the swift reply, sadly the issue still persists for me on 7.4.6. Python version is Python 3.12.9 |
Confirmed in my own environment with win10 and admin. Python 3.13.2 & tksheet 7.4.6, that the demo script above (and other scripts) still have the 'left arrow jumps to first column' issue. |
Hello, thanks for the testing and report, I have tried to fix it in I've added a "break" to the arrow key left function to try to prevent additional functions from running afterwards in case Home was being triggered and I've unbound Command Left for non-MacOS devices. |
Thanks for the hard work you did so quickly. In the latest version 7.4.7 the arrow keys are working properly. |
This program from your example ,
I found when use arrow key to move left cursor , cursor alway jumping to first column
from tksheet import Sheet
import tkinter as tk
class demo(tk.Tk):
def init(self):
tk.Tk.init(self)
self.grid_columnconfigure(0, weight=1)
self.grid_rowconfigure(0, weight=1)
self.frame = tk.Frame(self)
self.frame.grid_columnconfigure(0, weight=1)
self.frame.grid_rowconfigure(0, weight=1)
self.sheet = Sheet(self.frame,
data=[[f"Row {r}, Column {c}\nnewline1\nnewline2" for c in range(50)] for r in range(500)])
self.sheet.enable_bindings(
"single_select",
"drag_select",
"edit_cell",
"paste",
"cut",
"copy",
"delete",
"select_all",
"column_select",
"row_select",
"column_width_resize",
"double_click_column_resize",
"arrowkeys",
"row_height_resize",
"double_click_row_resize",
"right_click_popup_menu",
"rc_select",
)
self.sheet.extra_bindings("begin_edit_cell", self.begin_edit_cell)
self.sheet.edit_validation(self.validate_edits)
self.sheet.popup_menu_add_command("Say Hello", self.new_right_click_button)
self.frame.grid(row=0, column=0, sticky="nswe")
self.sheet.grid(row=0, column=0, sticky="nswe")
app = demo()
app.mainloop()
The text was updated successfully, but these errors were encountered: