On Jun 24, 12:07 am, Ben Finney <ben+pyt...@benfinney.id.au> wrote:
> Alan G Isaac <alan.is...@gmail.com> writes:
>
> > Of course one can do
> >    myintvar.set(myintvar.get()+1)
> > but surely there is a better way?
>
> What is an IntVar? It's not a built-in type, so you'll need to tell us.

For those who don't know; IntVar is from the module Tkinter. It is a
class to contain an integer control var used to update Tkinter widgets
that support it.

@OP: No there is not an __iadd__ method in the IntVar class but if you
really, really want to update this way just subclass IntVar and create
the method yourself. OOP is cool like dat!

You can also configure a Tkiter widget via the Python syntax w[key] =
value OR w.config(key1=value1, key2=value2, ...)


-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to