Giter Site home page Giter Site logo

Comments (7)

ragardner avatar ragardner commented on May 23, 2024 1

@JamesGKent

I have removed the tries and made the ms a variable, version notes:

Version 4.9.96

  • Fix bug with dragging scrollbar when columns are shorter than window
  • Add startup argument after_redraw_time_ms default is 100

from tksheet.

JamesGKent avatar JamesGKent commented on May 23, 2024

i should probably add that while this helps if your data is being generated in the main thread (i.e. where mainloop runs) this doesn't help once threading is involved as then its always idle. in which case I changed the above to a normal after call with a 100ms timeout. this may be beneficial to offer as an option

from tksheet.

ragardner avatar ragardner commented on May 23, 2024

Hm, yes thanks, this seems like a good idea, would a standard after call with the variable check be okay as disabled* by default? and you think 100ms would be an appropriate time?

edited to disabled by default*

from tksheet.

JamesGKent avatar JamesGKent commented on May 23, 2024

for me a standard after call worked better and would allow people to tailor to their own needs, are you thinking additional arguments to the constructor for this or a function to set this behavior up?

from tksheet.

ragardner avatar ragardner commented on May 23, 2024

It should be working in 4.9.95 to enable it you have to use redraw = True

give it a go and let me know if something isn't right

from tksheet.

JamesGKent avatar JamesGKent commented on May 23, 2024

this looks good, a few comments though:

  1. why have you wrapped every call to after in a try: except: block? I've never ever seen this call fail as it only queues an event to happen and a try: except without a specific exception class isn't very clean.
  2. would it not be better to use an instance variable set to 100ms by default rather than hard coding it everywhere used?

from tksheet.

ragardner avatar ragardner commented on May 23, 2024

Thanks for your comments,

I used try because I recalled scenarios in the past where the window had been destroyed and after was called resulting in an error which froze the program and prevented it from closing properly, although I wasn't sure if it's of any use having it before hand and the redraw method already has a try in it so maybe i'll remove them

Yeah good point about the variable, will change soon

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.