Comments (9)
Yes you're right, the bindings are different under Linux, will try to get this fix included in next version
thanks
from tksheet.
Thank you ;-)
from tksheet.
You can try out the fix in I added 4.9.9
if you want to
from tksheet.
Hi,
code in _tksheet_main_table.py
is correct for Linux into basic_bindings
function but it does not work with 4.9.9
I was using 4.9.1 and it seems that function mousewheel
has changed from 4.9.9
I tested with the old mousewheel
function and it is OK
mousewheel 4.9.1:
tksheet/tksheet/_tksheet_main_table.py
Line 2222 in b1e277d
from tksheet.
as you added platform detection it could be temporally (quick fix) a linux binding to mousewheel_linux
which is the old function ? and the new mousewheel
one for windows ?
may be you do not have the possibility to test on linux ?
from tksheet.
Sorry about that, it must be the event.num
hopefully it works for you in 4.9.92
from tksheet.
Hi @ragardner
Thank you for your quick answer :-)
Well, it does not work yet (for some reason enum.delta is always 0 on linux)
Here is the code modification which is working: simple elif instead of if
def mousewheel(self, event = None):
if event.delta < 0 or event.num == 5:
self.yview_scroll(1, "units")
self.RI.yview_scroll(1, "units")
elif event.delta >= 0 or event.num == 4:
if self.canvasy(0) <= 0:
return
self.yview_scroll(-1, "units")
self.RI.yview_scroll(-1, "units")
self.main_table_redraw_grid_and_text(redraw_row_index = True)
I added as well shift_mousewheel
using your code for mousewheel into basic_bindings
function as following (with the unbind too)
if USER_OS == "Linux":
for canvas in (self, self.CH):
canvas.bind("<Shift-Button-4>", self.shift_mousewheel)
canvas.bind("<Shift-Button-5>", self.shift_mousewheel)
and modify shift_mousewheel
function as following with elif as well and move event.num == 4 with elif
def shift_mousewheel(self, event = None):
if event.delta < 0 or event.num == 5:
self.xview_scroll(1, "units")
self.CH.xview_scroll(1, "units")
elif event.delta >= 0 or event.num == 4:
if self.canvasx(0) <= 0:
return
self.xview_scroll(-1, "units")
self.CH.xview_scroll(-1, "units")
self.main_table_redraw_grid_and_text(redraw_header = True)
And it is working well, if you can introduce those modifications that would be great
Thanks
from tksheet.
Sorry about that, they have been introduced in 4.9.94
and yeah, I don't have access to Linux at the moment, need to install to 2nd hard drive at some point
Edited: version 4.9.94
is the correct version
from tksheet.
Yes all is OK now with 4.9.94
Thank you very much :-)
from tksheet.
Related Issues (20)
- Add prompt for wrong keyward args in get_sheet_data/get_cell_data/get_row_data/get_column_data HOT 1
- Issue with set_sheet_data HOT 6
- Manually set displayed row index HOT 3
- Dropdown menu fails to open if some rows are hidden HOT 2
- Update cells data using specific conditions on user input. HOT 27
- SyntaxWarning HOT 3
- Currently selected cell rows in sheet vs in data HOT 2
- on Rpi5, OS debian bookworm, tksheet's sheet defined col-w & row-h of 10x16 cells size has slow/lagging mouse's cursor movement HOT 12
- How to fix the maximum size of characters in tksheet ceels HOT 6
- The tabel font does not change. HOT 1
- How to Check if a Check Box is checked in tksheet 7 HOT 1
- How to accept user input even if "enter" is not pressed HOT 4
- Looking to customize scrollbar and scrollbar frame bg HOT 2
- Don't work keyboard UP arrow when navigating through the table of tksheet HOT 1
- Multiple issues with Toggle Select Mode
- Partial Horizontal Scrolling HOT 2
- Rows sorting? HOT 2
- Cell Selection Persistence HOT 2
- Keypad enter button ignored HOT 2
- Quotes multiplies when i copy text from cell with ctrl+c or popup menu. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tksheet.