Re: Tkinter- checkbutton

2005-11-04 Thread Tuvas
That solved the problem. Thanks! -- http://mail.python.org/mailman/listinfo/python-list

Re: Tkinter- checkbutton

2005-11-04 Thread Jim Segrave
In article <[EMAIL PROTECTED]>, Tuvas <[EMAIL PROTECTED]> wrote: >Ere, ignore the mis-capped Checkbutton and the missed master call in >it... > You need to use a Tkinter variable (IntVar, StringVar or whatever), associate it with the Checkbutton, and access it with the get() and set() methods: fr

Re: Tkinter- checkbutton

2005-11-04 Thread Tuvas
Ere, ignore the mis-capped Checkbutton and the missed master call in it... -- http://mail.python.org/mailman/listinfo/python-list

Tkinter- checkbutton

2005-11-04 Thread Tuvas
I want to have a checkbutton that when it is pushed will do a function depending on if it was pushed before or not. Ei: b=checkbutton(command=check) b.grid(row=0,column=0) def check(): if (b.value==0): do_stuff_here() elif(b.value==1) do_other_stuff_here() However,

Re: Tkinter Checkbutton initialization problem

2005-07-04 Thread Eric Brunel
On 03 Jul 2005 02:32:21 -0700, Paul Rubin wrote: > Python 2.4, Windows XP. If I say: > > f = Frame() > f.grid() > v = IntVar() > c = Checkbutton(f, text='hi there', variable=v) > c.grid() > f.mainloop() > > then the checkbutton should initially d

Re: Tkinter Checkbutton initialization problem

2005-07-03 Thread Paul Rubin
Scott David Daniels <[EMAIL PROTECTED]> writes: > Paul Rubin wrote: > > Python 2.4, Windows XP. If I say: > > f = Frame() > > f.grid() > > v = IntVar() >v.set(1) # Might help. v.get() at this point returned 0 for me. Yeah, I tried that too. Further reorganization of the cod

Re: Tkinter Checkbutton initialization problem

2005-07-03 Thread Scott David Daniels
Paul Rubin wrote: > Python 2.4, Windows XP. If I say: > f = Frame() > f.grid() > v = IntVar() v.set(1) # Might help. v.get() at this point returned 0 for me. > c = Checkbutton(f, text='hi there', variable=v) > c.grid() > f.mainloop() -- http://mail.python.org/mailm

Tkinter Checkbutton initialization problem

2005-07-03 Thread Paul Rubin
Python 2.4, Windows XP. If I say: f = Frame() f.grid() v = IntVar() c = Checkbutton(f, text='hi there', variable=v) c.grid() f.mainloop() then the checkbutton should initially display as being checked. But it doesn't. It shows up unchecked, even though v.get() returns 1.