Metadata-Version: 2.2
Name: tkextras
Version: 1.1.0
Summary: A Tkinter utility module for enhanced widgets rendering
Home-page: https://github.com/whellcome/tkextras
Download-URL: https://github.com/whellcome/tkextras/archive/master.zip
Author: Dietmar Steinle
License: MIT
Project-URL: Documentation, https://tkextras.readthedocs.io/
Project-URL: Source Code, https://github.com/whellcome/tkextras/tree/master/tkextras
Project-URL: Examples, https://github.com/whellcome/tkextras/tree/master/examples
Keywords: tkinter,ttk,gui
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Topic :: Software Development :: Libraries :: Tcl Extensions
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pandas>=1.0
Dynamic: author
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: download-url
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: project-url
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# 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()`, and `place()` methods.
- **TreeviewDataFrame**: Extended `ttk.Treeview` that synchronizes with `pandas.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](https://tkextras.readthedocs.io) and usage examples.

## Installation

1. Install the module:

    ```sh
    pip install tkextras
    ```

2. Clone the repository:
   ```bash
   git clone https://github.com/whellcome/tkextras.git
   cd tkextras
   ```

## Usage

### Rendering Widgets Easily

```python
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](examples/example_widgets_render.py)** of WidgetsRender application


### Working with Treeview and DataFrames

```python
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](examples/example_treeview_dataframe.py)** of TreeviewDataFrame application:

![Example TreeviewDataFrame](https://raw.githubusercontent.com/whellcome/tkextras/4318f6286a884fd38f3a8827b05bf871910e6a30/example_treeview_dataframe.png)

## Documentation

Complete documentation is available at:

рџ“– **[Project Documentation](https://tkextras.readthedocs.io)**

## Examples

For real-world applications, see the **examples/** folder, or check out:

- **MS Access to SQL Export Tool** ([GitHub](https://github.com/whellcome/MSAccessToSQL)) - 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](https://github.com/whellcome/tkextras/issues) on GitHub.

## License

This project is licensed under the MIT License.

---

рџљЂ **Enhance your tkinter experience with tkextras!**
