The pack manager

The pack geometry manager is the oldest geometry manager available with Tk and Tkinter. The pack geometry manager places slave widgets in a master widget, adding them one at a time in the order in which slaves are introduced. Following table shows the available pack() methods and options:

Methods

Description

config = configure = pack_configure(self, cnf={}, **kw)

Pack a widget in the parent widget. Use as options:

  • after=widget: pack it after you have packed widget
  • anchor=NSEW (or subset): position widget according to given direction
  • before=widget: pack it before you will pack widget
  • expand=bool: expand widget if parent size grows
  • fill=NONE (or X or Y or BOTH): fill widget if widget grows
  • in=master: use master to contain this widget
  • in_=master: see 'in' option description
  • ipadx=amount: add internal padding in x direction
  • ipady=amount: add internal padding in y direction
  • padx=amount: add padding in x direction
  • pady=amount: add padding in y direction
  • side=TOP (or BOTTOM or LEFT or RIGHT): where to add this widget

forget = pack_forget(self)

Unmap this widget and do not use it for the packing order.

info = pack_info(self)

Return information about the packing options for this widget.

propagate =pack_propagate(self, flag=['_noarg_']) from Tkinter.Misc

Set or get the status for propagation of geometry information.

A Boolean argument specifies whether the geometry information of the slaves will determine the size of this widget. If no argument is given, the current setting will be returned.

slaves = pack_slaves(self) from Tkinter.Misc

Return a list of all slaves of this widget in its packing order.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.138.122.11