Mark,
There are two problems here:
> from Tkinter import *
> def go():...
> e=Entry(main)
> e.pack()
This is OK but...
> b=Button(main,text='OK',command=go()).pack()
Problem 1:
This will store None in b because pack() always returns None.
Problem 2:
> For some reason the function is called b
On Sun, 20 Feb 2005 17:12:54 +0200
Mark Kels <[EMAIL PROTECTED]> wrote:
> Hi all.
> First, here is the code I have a problem with (I got same problem in
> my project) :
> from Tkinter import *
> def go():
> e.get()
> print e
>
> main=Tk()
> e=Entry(main)
> e.pack()
> b=Button(main,text='O
Hi all.
First, here is the code I have a problem with (I got same problem in
my project) :
from Tkinter import *
def go():
e.get()
print e
main=Tk()
e=Entry(main)
e.pack()
b=Button(main,text='OK',command=go()).pack()
main.mainloop()
For some reason the function is called before I click th