Tkinter widget to display data over multiple columns.
Project description
multiframe_list.py
Compact raw python module that brings the MultiframeList class with it. It is a tkinter widget that can be used to display data split up over multiple columns. It integrates into the ttk styling database and applies certain style configurations to otherwise unstylable Listboxes.
Installation
Get it by running pip install multiframe_list
Example script:
import tkinter as tk
from multiframe_list import MultiframeList
def format_price(raw):
dollars, cents = divmod(raw, 100)
return f"${dollars}.{cents:0>2}"
items = (
("Apple", 79, 42),
("Pear", 79, 58),
("Egg", 29, 24),
("HL3", 99999999903, 1),
)
root = tk.Tk()
item_display = MultiframeList(root, inicolumns = (
{"name": "Items", "col_id": "col_items", "sort": False},
{"name": "Price", "col_id": "col_prices", "sort": True,
"formatter": format_price},
{"name": "Stock", "col_id": "col_qty", "sort": False},
))
item_display.setdata({
"col_items": [t[0] for t in items],
"col_prices": [t[1] for t in items],
"col_qty": [t[2] for t in items],
})
item_display.format()
# Required for the price formatter or that column would display raw values
item_display.grid(sticky = "nesw")
root.mainloop()
Will result in this window:
Documentation
Most information can be found in the docstrings of the MultiframeList's class and its methods.
Other than that:
~ ### ~ ~
*#*
/ s \
___ _
/ -] /| |
___n____m_-_|___|__||_____---_|__
. _ .
.-. ~ ___ ' .
n_|:| . ' __
'-. |_n _ _______ .
| .-' __.
_|:|___ * - [__/
| | ~ ===
* ___ . - ---
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for multiframe_list-3.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ac4ee89eb1a4b6a8f8af204c7462031c75aea5409fdd1c2ffe559f6f0dbbf61 |
|
MD5 | 7aeaabcb75696b25dee64534f6441222 |
|
BLAKE2b-256 | da12f345fb4af2e941108f1a1da6f7354d16a1417e00c815c2ca761c6dd0409b |