[wingide-users] (no subject)
Eric F
efmgdj at yahoo.com
Mon Jul 13 09:01:36 MDT 2009
Thanks! That solves part of the problem. If I run:
from Tkinter import *
tk = Tk()
btn = Button(tk, text="click me")
btn.pack()
mainloop()
then the tk window appears, but I then I can't change it. For example if I want to add another button I run into trouble:
from Tkinter import *
tk = Tk()
btn1 = Button(tk, text="click me")
btn1.pack()
btn2 = Button(tk, text="click me")
btn2.pack()
mainloop()
shows two buttons as expected but I can't see them dynamically
from Tkinter import *
tk = Tk()
btn1 = Button(tk, text="click me")
btn1.pack()
mainloop()
btn2 = Button(tk, text="click me")
btn2.pack()
mainloop()
only shows a single button and doesn't reload. (I've tried the analogous program for drawing lines.)
Any ideas on how to do dynamic stuff with tk in wing?
thanks,
Eric
--- On Mon, 7/13/09, Wingware Support <support at wingware.com> wrote:
> From: Wingware Support <support at wingware.com>
> Subject: Re: [wingide-users] (no subject)
> To: "Eric F" <efmgdj at yahoo.com>
> Cc: wingide-users at wingware.com
> Date: Monday, July 13, 2009, 10:44 AM
> Eric F wrote:
> > Hi, I know there are messages on this list saying that
> tkinter works, but it won't work for me on wing 101
> 3.0. Even something as simple as:
> >
> > from Tkinter import *
> > tk = Tk()
> > btn = Button(tk, text="click me")
> > btn.pack()
>
> Add this and the window will appear:
>
> mainloop()
>
> Wing does not automagically run the mainloop. I think
> gets done when in a shell
> outside of Wing b/c the module recognizes the environment,
> but Wing's shell and
> debugger are not recognized.
>
> --
> Stephan Deibel
> Wingware | Python IDE
> Advancing Software Development
>
> www.wingware.com
>
>
More information about the wingide-users
mailing list