[Tkinter-discuss] update of elements in GUI
Alex Ter-Sarkissov
sigma.z.1980 at gmail.com
Thu Aug 19 02:24:35 CEST 2010
thanks guys, this does seem to work...nevertheless, since I'm quite new to
both python and gui design, one more question: how would I do the same, but
launching the counter at the click of the button? I tried (from Firat's last
example)
def increment(*args): var.set(var.get()+1) root.after(1000, increment)
but1=Button(text="click me", command=increment)
but1.grid()
but without any success.
cheers!
2010/8/19 Firat Ozgul <ozgulfirat at gmail.com>
> [quote]Cameron Laird: "update() is *not* essential: after() provides a
> non-threading alternative."[/quote]
>
> I agree. If you would not like to use update(), you can use after() in your
> code with pretty much the same functionality:
>
> http://paste-it.net/public/e7ce371/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tkinter-discuss/attachments/20100819/98be56a5/attachment.html>
More information about the Tkinter-discuss
mailing list