[Tkinter-discuss] Lots of widgets in a Text widget

Guilherme Polo ggpolo at gmail.com
Thu Jul 17 02:19:06 CEST 2008


On Wed, Jul 16, 2008 at 7:17 PM, Bob Greschke <bob at passcal.nmt.edu> wrote:
> I have a program that maintains a simple, on-the-fly database using a
> dictionary.  The user can see what is going on with it by brining up a
> toplevel with a Text() widget.  Checkbuttons and Entry fields are used to
> display the state of the items in the database (see picture).
>
> www.passcal.nmt.edu/~bob/unlinked/images/showdb.tiff
>
> The EN, AE, BR, etc. "flags" are the Checkbuttons and to the right of each
> TP, TO and ST label is an Entry field.  Each line is one seismic recording
> instrument which this program talks to.  From this 'form' the user can
> manually make changes to the state of each instrument by just clicking the
> flags or entering stuff in the fields.  The problem is when there are
> hundreds of instruments it starts to take a long time to open the form and
> fill it all in, scroll the form, and close the form and destroy all of those
> widgets.  Is there a faster way?

What if you limit the amount of instruments shown at a time ? Does it
bring any advantage to show them all ?

Also, you could try running that app under tk 8.5, it will require no
changes and it is said to be 10% faster but I have never tested it so
maybe you can test this.

> Would putting all of this on a Canvas be
> faster?  I'd try it, but it would take a bit of messing just to do the
> experiment -- only to find out it's not faster, plus I'm not looking forward
> to counting pixels to get everything to line up.  This late-summer we will
> have an experiment with a few thousand instruments, so I'm lookin' for a
> solution. :)
>
> Thanks!
>
> Bob
> _______________________________________________
> Tkinter-discuss mailing list
> Tkinter-discuss at python.org
> http://mail.python.org/mailman/listinfo/tkinter-discuss
>



-- 
-- Guilherme H. Polo Goncalves


More information about the Tkinter-discuss mailing list