Giter Club home page Giter Club logo

Comments (8)

ragardner avatar ragardner commented on June 3, 2024

Thanks for bringing this up,

The reasons for the current limited support for Mac - I originally just made the widget for personal use in a windows desktop app and I don't have any Mac devices to test it on

I really appreciate you taking the time to write a fix, couple of questions though,

Does your code fix all the scrolling issues for you or is there more work to be done?

Also, If it's not too much trouble, would you happen to know how I might make Copy etc work on a touch pad, does the touchpad_events() function receive an event after long pressing on touch screen and if so what does the object look like internally? Perhaps I can use a popup menu to allow the functionality?

Thanks for your help and testing

from tksheet.

ragardner avatar ragardner commented on June 3, 2024

O and lastly sorry, if possible would you be able to test if .bind("<Mod1- or .bind("<Command- in addition to .bind("<Control- fixes the mac cmd key issues on a mac desktop device?

from tksheet.

PatLechevallier avatar PatLechevallier commented on June 3, 2024

Re,

So I have just tested it on Windows:
It's fully working from the MouseWheel: Wheel Scrolling activates Vertical scrolling and Shift key pressed + Wheel Scrolling activate Horizontal scrolling
From the TouchPad, only the Vertical scrolling works, event with Shift pressed Horizontal scrolling doesn't work, but it's not a code issue because I even don't receive the event.
To Try On Windows: Bind to self.bind("<Shift-MouseWheel>", self.shift_mousewheel) to see if the binding receives the event.

Edit: On my mac, the refresh of the column header is not activated when scrolling horizontally, didn't check if it's the same on Windows. But it's a minor issue, it's refreshed with a click on the sheet

Also, If it's not too much trouble, would you happen to know how I might make Copy etc work on a touch pad, does the >touchpad_events() function receive an event after long pressing on touch screen and if so what does the object look
like internally? Perhaps I can use a popup menu to allow the functionality?

Oups, sorry touchpad_events() is a bad name should be just mousewheel(self, event).
From what I know, there is no generic touchpad event, click, pressure and release, are just translated to basic Button events.

https://stackoverflow.com/questions/32289175/list-of-all-tkinter-events

from tksheet.

PatLechevallier avatar PatLechevallier commented on June 3, 2024

Re,

I confirm self.bind("<Command- works.
So you it should be nice to bind depending on the OS:
https://stackoverflow.com/questions/110362/how-can-i-find-the-current-os-in-python

from tksheet.

ragardner avatar ragardner commented on June 3, 2024

Thanks for your help, I will let you know when I have made the updates

from tksheet.

ragardner avatar ragardner commented on June 3, 2024

@PatLechevallier I think I have made all the changes except for the touch pad horizontal scroll which I'll have to continue to work on, your code worked well thank you

also column headers refreshes as well with horizontal scroll

Version 4.9.2

  • Add mac OS command c, x, v, z bindings
  • Make shift - mousewheel horizontal scroll

from tksheet.

PatLechevallier avatar PatLechevallier commented on June 3, 2024

Hi,

if event.num == 5 or event.delta == -120:
self.yview_scroll(1, "units")
self.RI.yview_scroll(1, "units")
if event.num == 4 or event.delta == 120:
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)

Sorry, you missed the or event.delta == -1: and or event.delta == 1:for the vertical Scroll on Mac
Beside this, it works well! You can close this ticket after the little fix.

Thank You very much!

from tksheet.

ragardner avatar ragardner commented on June 3, 2024

Woops, should be fixed in 4.9.3

from tksheet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.