OPPS. I left off the code.
 
#hello.py start
 
from Tkinter import *
 
def greeting():
    label.config(text='hello')
    label.pack(side=TOP)
    hello.pack(side=LEFT, expand=YES,fill=BOTH)
    quit.pack(side=RIGHT, expand=YES, fill=BOTH)
 
win = Frame()
win.pack()
 
label = Label(win)
label.config(text='Yet Another Hello world')
label.pack(side=TOP)
 
hello = Button(win)
hello.config(text='Hello', command=greeting)
hello.pack(side=LEFT, expand=YES,fill=BOTH)
quit = Button(win)
quit.config(text='Quit', command=win.quit)
quit.pack(side=RIGHT, expand=YES, fill=BOTH)
 
win.mainloop()
 
#hello.py end
 
----- Original Message -----
Sent: Saturday, April 21, 2001 3:38 AM
Subject: Wierd Tkinter siding

I am stumped. I'm using ActiveStates' Python2.1 for windows as well as their
Komodo beta1(build 18242). The attached program I have been modifying as
my python learning process. My question stems from the greeting function,
when it's run the 2 buttons (hello and quit) reajust themselves. As you can see
I have tried to repack them with not effect.
 Just in case that this script works for everyone but me I'll illustrate what
happens:
 

 start script
  |tk                                          x|
  |     Yet Another Hello world       |
  ||hello|                              |quit ||
  
  
 press hello button
  |tk                                 x|
  |                hello               |
  |           |hello||quit|            |
  
I would really like to know why this happens and what I can do to stop it.
Thank you
[EMAIL PROTECTED]

Reply via email to