Name
pack
Synopsis
w
.pack(**pack_options
)
Delegates geometry management to the
packer. pack_options
may include:
-
expand
When true,
w
expands to fill any space not otherwise used inw
’s parent.-
fill
Determines whether
w
fills any extra space allocated to it by the packer, or keeps its own minimal dimensions:NONE
(default),X
(fill only horizontally),Y
(fill only vertically), orBOTH
(fill both horizontally and vertically).-
side
Determines which side of the parent
w
packs against:TOP
(default),BOTTOM
,LEFT
, orRIGHT
. To avoid confusion, don’t mix different values for optionside=
in widgets that are children of the same container. When more than one child requests the same side (for exampleTOP
), the rule is first come, first served: the first child packs at the top, the second child packs second from the top, and so on.
Get Python in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.