• R/O
  • SSH

tklayout: Resumo do Repositório

Default repository for tklayout.py.

Recent Commits RSS

Rev. Hora Autor Mensagem
b3c6bfea1a56 2020-01-09 21:50:52 Dreas Nielsen tip Documentation changes re change in repository and documen...
dfc28cabfe91 2018-03-18 08:10:59 Dreas Nielsen Added tag 1.0.0 for changeset ce03759551ce
ce03759551ce 2018-03-18 08:10:54 Dreas Nielsen 1.0.0 Revised documentation and bumped version number to 1.0.0.
4404375b60a3 2018-02-26 13:19:48 Dreas Nielsen Changes to prepare to allow panes to appear on separate n...
956ae7e1de95 2018-02-08 14:03:00 Dreas Nielsen Added custom CSS and modified documentation.
47f549b8daec 2018-01-28 01:55:02 Dreas Nielsen More documentation edits.
e4c5650a41ad 2018-01-28 01:41:31 Dreas Nielsen Additional edits to documentation.
1e77eaefaec6 2018-01-28 01:27:55 Dreas Nielsen Additional edits to documentation.
486b41ebec8d 2018-01-28 00:45:43 Dreas Nielsen Documentation edits.
78927175f0a7 2018-01-27 12:01:03 Dreas Nielsen Removed default border on frames.

Recently edited Tags

Nome Rev. Hora Autor
1.0.0 ce03759551ce 2018-03-18 08:10:54 Dreas Nielsen
tip b3c6bfea1a56 2020-01-09 21:50:52 Dreas Nielsen


Nome Rev. Hora Autor Mensagem
default b3c6bfea1a56 2020-01-09 21:50:52 Dreas Nielsen Documentation changes re ch...


The TkLayout Python Libary

This library (*tklayout.py*) simplifies the layout of Tkinter user
interfaces by allowing the developer to specify the structure of the
interface 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


          |              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.osdn.io/

Show on old repository browser