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.button3 = Button( self, text = "expand = YES, fill = X" )
self.button3.pack( side = LEFT, expand = YES, fill = X )
def main():
PackDemo().mainloop()
if __name__ == "__main__":
main()
|