I had a similar problem, with my application with Text and Canvas. After some testing I realized that enormous amount of time was used by Tk/Tcl from the tag_bind routine. In the end I've decided to use a global binding for the mouse and cache the bounding box of each element. It is a bit more messier to handle because for each modification you have to take care on the position of the bounding boxes, but in the end is much faster than using the tag_bind

Cheers
Vasilis

Bob Greschke wrote:
Personally, I don't think it does any good to see any of them. The users will just get in there and mess things up! Haha.

I could have a different form where they enter the ID number of an instrument and just work with that unit. There's really no logical way to split them up other than like 100 at a time or something like that. Which one the user wants to change info for is usually just random so showing them all is best. Changing things manually is only really done if one stops working and you need to set the broken flag or fill in that last field with a designation for the deployed location.

We should be updating to 8.5 next week so I'll try it out.

Thanks!

Bob

--------
Sent from my iPod

On Jul 16, 2008, at 18:19, "Guilherme Polo" <[EMAIL PROTECTED]> wrote:

On Wed, Jul 16, 2008 at 7:17 PM, Bob Greschke <[EMAIL PROTECTED]> 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@python.org
http://mail.python.org/mailman/listinfo/tkinter-discuss




--
-- Guilherme H. Polo Goncalves

_______________________________________________
Tkinter-discuss mailing list
Tkinter-discuss@python.org
http://mail.python.org/mailman/listinfo/tkinter-discuss

begin:vcard
fn:Vasilis Vlachoudis
n:Vlachoudis;Vasilis
org:CERN;AB
adr:CERN;;Dep.AB;Geneva-23;;CH-1211;Switzerland
email;internet:[EMAIL PROTECTED]
title:Dr
tel;work:+41-22-767.9851
tel;fax:+41-22-766.9644
tel;cell:+41-76-487.4378
x-mozilla-html:FALSE
url:http://home.cern.ch/bnv
version:2.1
end:vcard

_______________________________________________
Tkinter-discuss mailing list
Tkinter-discuss@python.org
http://mail.python.org/mailman/listinfo/tkinter-discuss

Reply via email to