Skip to main content

This library simplifies the layout of Tkinter user interfaces by allowing the developer to specify the structure of the interface elements from the inside out.

Whereas Tkinter requires that nested frames and other widgets be created from the outside in (i.e., the outermost frame created first), the layout of an interface is often easier to conceptualize and describe from the inside out. For example, a layout composed of the following elements:

+------------------------------------+
|              Element D             |
+-------------------+----------------+
|    Element A      |                |
+-------------------+    Element C   |
|    Element B      |                |
+-------------------+----------------+
|              Element E             |
+------------------------------------+

could be described as

  • Elements A and B vertically arranged in a column,

  • Joined left to right with Element C in a row,

  • Joined in a single column with Element D above and Element E below.

This sort of narrative description can be easily represented in code by assigning names to each of the layout elements (e.g., “A”, “B”, “C”, “D”, and “E”), instantiating an object of the AppLayout class from the tklayout module (e.g., “lo”), and then calling the following methods:

ab = lo.column_elements(["A", "B"])
abc = lo.row_elements([ab, "C"])
app = lo.column_elements(["D", abc, "E"])

and then creating the frames to represent this layout with:

lo.create_layout(root, app)

Restructuring the application’s layout is easily done simply by changing the calls to the row_elements() and column_elements() methods.

Full documentation is at ReadTheDocs: http://tklayout.readthedocs.io/

Metadata

Release files for tklayout 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tklayout 1.0.0
File Size Uploaded Provenance Actions
tklayout-1.0.0.tar.gz 6.0 kB Without provenance Details for tklayout-1.0.0.tar.gz

Release files / tklayout-1.0.0.tar.gz

Download URL tklayout-1.0.0.tar.gz
Size 6.0 kB
Tags Source
SHA-256 checksum
How to use checksums
217a060f8165bc96c42c32b23128114cdf6a2658943b8dc9517aa97856155f18
BLAKE2b-256 checksum
How to use checksums
fe12d6861d54e00d9aa95b858f22e0259e39c17247202c4a509101ca57ea0838
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for tklayout 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page