April 2018
Beginner
340 pages
7h 54m
English
Unlike pack and grid, which automatically calculate where each new widget is added, place can be used in order to specify an exact location for a particular widget. place takes either x and y coordinates (in pixels) to specify an exact spot, which will not change as the window is resized, or relative arguments to its parent, allowing the widget to move with the size of the window.
To place a widget at (5, 10) within the window, you would write widget.place(x=5, y=10).
To keep a widget in the direct center, you would use widget.place(relx=0.5, rely=0.5).
place also takes sizing options, so to keep a widget at 50 percent width and 25 percent height of the window, add (relwidth=0.5, relheight=0.25).
place is rarely used in bigger applications ...