Pack layout manager demonstration. : Layout : Tkinker PYTHON TUTORIALS


PYTHON TUTORIALS » Tkinker » Layout »

 

Pack layout manager demonstration.


Pack layout manager demonstration.
from Tkinter import *

class PackDemoFrame ):
   def __init__self ):
      Frame.__init__self )
      self.master.title"Packing Demo" )
      self.master.geometry"400x150" )
      self.packexpand = YES, fill = BOTH )

      self.button1 = Buttonself, text = "Add Button",command = self.addButton )

      self.button1.packside = TOP )

      self.button2 = Buttonself,text = "expand = NO, fill = BOTH" )

      self.button2.packside = BOTTOM, fill = BOTH )

      self.button3 = Buttonself,text = "expand = YES, fill = X" )

      self.button3.packside = LEFT, expand = YES, fill = X )

      self.button4 = Buttonself,text = "expand = YES, fill = Y" )

      self.button4.packside = RIGHT, expand = YES, fill = Y )   

   def addButtonself ):
      Buttonself, text = "New Button" ).packpady = )
      
PackDemo().mainloop()



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON TUTORIALS

 Navioo Tkinker
» Layout