A Tkinter utility module for enhanced widgets rendering
Project description
tkextras
Enhancing tkinter development with streamlined rendering and DataFrame-powered Treeview.
tkextras is a lightweight Python library that extends tkinter functionality, making GUI development easier and more efficient. It introduces a simplified widget rendering system and an extended Treeview component that integrates seamlessly with pandas DataFrames.
Features
- WidgetsRender: Unified interface for rendering widgets with
grid(),pack(), andplace()methods. - TreeviewDataFrame: Extended
ttk.Treeviewthat synchronizes withpandas.DataFrame. - Built-in Filtering: Interactive filtering and flagging for table-based data.
- Event System Integration: Custom events for enhanced user interaction.
- Sphinx Documentation: Full API documentation and usage examples.
Installation
-
Install the module:
pip install tkextras
-
Clone the repository:
git clone https://github.com/whellcome/tkextras.git cd tkextras
Usage
Rendering Widgets Easily
import tkinter as tk
from tkextras import WidgetsRender
class ExampleApp(WidgetsRender, tk.Tk, ):
def __init__(self):
super().__init__()
lable = self.rgrid(tk.Label(self), dict(row=0, column=0))
lable['text'] = "Hello, World!"
app = ExampleApp()
app.mainloop()
Advanced working example of WidgetsRender application
Working with Treeview and DataFrames
from tkextras import TreeviewDataFrame
import tkinter as tk
root = tk.Tk()
tree = TreeviewDataFrame(root, columns=["Name", "Married", "Employed"], show='headings')
tree.pack(fill="both", expand=True)
tree.insert("", "end", values=("Alice", " ", " ")) # Normal rows addition
tree.insert("", "end", values=("Bob", " ", " "))
tree.make_tree() # Tree design, can include a Dataframe(transformed, with identical columns) to loading
tree.bind("<<TreeToggleCell>>", lambda x: print(tree.df)) # DataFrame synchronization
root.mainloop()
Advanced working example of TreeviewDataFrame application:
Documentation
Complete documentation is available at:
Examples
For real-world applications, see the examples/ folder, or check out:
- MS Access to SQL Export Tool (GitHub) - Uses tkextras for UI components.
Contributing
Contributions are welcome! Open an issue or submit a pull request if you have improvements or bug fixes.
Need support or have a suggestion? 🚀🔥
Please open an issue on GitHub.
License
This project is licensed under the MIT License.
рџљЂ Enhance your tkinter experience with tkextras!
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 Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tkextras-1.1.0.tar.gz.
File metadata
- Download URL: tkextras-1.1.0.tar.gz
- Upload date:
- Size: 11.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3a794f038d0f664d25f7a4956b1d1dbc2833d1831adc5c844e5423ed17d5d3ea
|
|
| MD5 |
fe94b1671d76ee8902f3e45f004e9687
|
|
| BLAKE2b-256 |
7e17dbba93975b56606f52708882f015ab7fd6402a984e91335962d8c17fa30e
|
File details
Details for the file tkextras-1.1.0-py3-none-any.whl.
File metadata
- Download URL: tkextras-1.1.0-py3-none-any.whl
- Upload date:
- Size: 9.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
37014db41a58997acf0b517d34fcad11d34b90267b093ddabb1cbf499b7d2fcb
|
|
| MD5 |
42859bff61c29998737b7e8fec8d9deb
|
|
| BLAKE2b-256 |
eaefe2fbc46a2b0a6adc59f9bd010dada47392779849d59d48da7e0b208a69a4
|