This is python tkinter GUI pack method simulator
- Run script by python3
python packsim.py
(for my environment, "python" indicates python3)
- Configure items by bottom control panel
Control | Type | Explanation |
---|---|---|
pack | Checkbox | An item will be created on simulation window when checked it. Every other configurations of an item are meaningless when it's unchecked. By default, 4 items are selected. |
side | Combobox | An item will be packed on a selected side |
fill | Combobox | An item will try to be filled selected direction. It's limited by occupied area. |
expand | Checkbox | An item will try to expand occupied area. |
That's all. It'll be nice if it helps someone confusing about "pack" layout method of tkinter.
Packing order is always start from youngest number of items regardless your configuration operation. When you change something, actually all items are once deleted and re-packed again.
Sorry I was lazy to implement configuration reset feature. I knwo that reset feature wll be quite helpful but I think this is not an application used repeatedly after user understand how pack works. So, instead of taking effort on this, I'd like to focus on something more effective.