from Tkinter import *
class PackDemo( Frame ):
def __init__( self ):
Frame.__init__( self )
self.master.title( "Packing Demo" )
self.master.geometry( "400x150" )
self.pack( expand = YES, fill = BOTH )
self.button2 = Button( self, text = "expand = NO, fill = BOTH" )
self.button2.pack( side = BOTTOM, fill = BOTH )
def main():
PackDemo().mainloop()
if __name__ == "__main__":
main()
|