Tkinter is the most popular way to create Graphical User Interfaces (GUIs) in Python. For building GUIs, Tkinter provides developers with a number of standard widgets, including buttons, labels and text boxes.
Each of these widgets need to be positioned for user accessibility and widget focus, and then programmed with underlying application logic so they can work as intended in response to mouse clicks and other actions.
Positioning Widgets With Layout Managers
Tkinter has three built-in layout managers that use geometric methods to position widgets in an application frame:
pack() organizes widgets in horizontal and vertical boxes that are limited to left, right, top, bottom positions. Each box is offset and relative to each other.
place() places widgets in a two dimensional grid using x and y absolute coordinates.
grid() locates widgets in a two dimensional grid using row and column absolute coordinates.
Important: pack(), place(), and grid() should not be combined in the same master window. Instead choose one and stick with it.
Learn more and get the code snippets here: [ Ссылка ]
Now that you know how to add widgets using Python’s Tkinter, let’s move on to other things you can do with Tkinter: [ Ссылка ]
-----
Pre-bundled with the most important packages Data Scientists need, ActivePython is pre-compiled so you and your team don’t have to waste time configuring the open source distribution.
Ещё видео!