#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2013
    Posts
    24
    Rep Power
    0

    Refreshing widgets in ttk individually


    I have a GUI that I've developed in ttk, but I'm having a problem using the method

    Code:
    widget.update_idletasks()
    I have a progress bar that tracks the time it takes my GUI to build a ttk Treeview table. The problem is, I have to use progressbar.update_idletasks() to get the UI to redraw the progress bar values during my loop that builds my table, but when I use update_idletasks(), tkinter redraws the Treeview table as well, and it drastically slows down the load time of the table. It basically makes each individual list be placed into the table one at a time, so its very slow, but if I take out update_idletasks(), the progress bar will not update.

    Does anyone know how to make tkinter only redraw a specific widget?
  2. #2
  3. Contributing User
    Devshed Demi-God (4500 - 4999 posts)

    Join Date
    Aug 2011
    Posts
    4,966
    Rep Power
    481

    A patch


    You could call update idle tasks less frequently. I know this doesn't solve the fundamental problem. Maybe you'd get a good answer on a tcl forum.
    [code]Code tags[/code] are essential for python code and Makefiles!

IMN logo majestic logo threadwatch logo seochat tools logo