Skip to content

Commit 14e1840

Browse files
committed
7.3.x -> 7.4.0
#### Changed: - Text now wraps by character by default, can also disable wrapping or wrap by word - Significant changes to how text is rendered - Removed mousewheel scrolling lines in header, replaced with vertical axis table scroll - Resizing row height to text is now based on the existing column width for the cell/cells, includes double click resizing - Treeview mode `Node` class now uses `str` for parent and `list[str]` for children attributes - Function `get_nodes()` renamed -> `get_iids()` - Removed `data_indexes` parameter from `mapping_move...` functions - Reduce default treeview indent - `move()` function now returns the same as other move rows functions - All `Sheet()` functions with an `undo` parameter have been set to `True` by default - Using `Sheet.set_data()` or `Span`s to set an individual cell's data as `None` will now do so instead of returning - Setting `show_top_left` during Sheet() initialization will now make the top left rectangle always show #### Added: - Natural sorting functionality [#238](#238) - Treeview mode now works with all normal tksheet functions, including dragging and dropping rows - Cell text overflow `allow_cell_overflow: bool = False` to adjacent cells for left and right alignments, disabled by default - Text wrap for table, header and index ```python # "" no wrap, "w" word wrap, "c" char wrap table_wrap: Literal["", "w", "c"] = "c", index_wrap: Literal["", "w", "c"] = "c", header_wrap: Literal["", "w", "c"] = "c", ``` - `tree` parameter to `insert_rows()` function, used internally #### Fixed: - Index fonts now work correctly - Functions `column_width()` and `row_height()` work correctly for any parameters - Down sizing rows/columns when scrolled to the end of the axis would result in a rapid movement of row height/column width - Address [#269](#269) #### Improved: - Minor performance improvements for: - `item_displayed()` - `show_rows()` / `show_columns()` - `move()` - Row insertion
1 parent 691e9f8 commit 14e1840

13 files changed

+1621
-1089
lines changed

README.md

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<img width="45%"src="https://github.com/user-attachments/assets/08e77e89-00ea-4c52-9222-9bd421284360" alt="tksheet treeview">
44
</p>
55

6-
# <div align="center">tksheet - python tkinter table widget</div>
6+
# <div align="center">tksheet - python tkinter table + treeview widget</div>
77

88
[![PyPI version shields.io](https://img.shields.io/pypi/v/tksheet.svg)](https://pypi.python.org/pypi/tksheet/) ![python](https://img.shields.io/badge/python-3.8|3.9|3.10|3.11|3.12|3.13-blue) [![License: MIT](https://img.shields.io/badge/License-MIT%20-blue.svg)](https://github.com/ragardner/tksheet/blob/master/LICENSE.txt)
99

@@ -41,32 +41,24 @@
4141

4242
This library is maintained with the help of **[others](https://github.com/ragardner/tksheet/graphs/contributors)**. If you would like to contribute please read this [help section](https://github.com/ragardner/tksheet/wiki/Version-7#contributing).
4343

44-
## **Changes for versions `7`+:**
45-
46-
- **ALL** `extra_bindings()` event objects have changed, information [here](https://github.com/ragardner/tksheet/wiki/Version-7#bind-specific-table-functionality).
47-
- The bound function for `extra_bindings()` with `"edit_cell"`/`"end_edit_cell"` **no longer** requires a return value and no longer sets the cell to the return value. Use [this](https://github.com/ragardner/tksheet/wiki/Version-7#validate-user-cell-edits) instead.
48-
- `edit_cell_validation` has been removed and replaced with the function `edit_validation()`, information [here](https://github.com/ragardner/tksheet/wiki/Version-7#validate-user-cell-edits).
49-
- Only Python versions >= `3.8` are supported.
50-
- `tksheet` file names have been changed.
51-
- Many other smaller changes, see the [changelog](https://github.com/ragardner/tksheet/blob/master/docs/CHANGELOG.md) for more information.
52-
5344
## **Features**
5445

5546
- Smoothly display and modify tabular data
5647
- [Edit cells directly](https://github.com/ragardner/tksheet/wiki/Version-7#table-functionality-and-bindings)
5748
- Cell values can potentially be [any class](https://github.com/ragardner/tksheet/wiki/Version-7#data-formatting), the default is any class with a `__str__` method
5849
- [Drag and drop columns and rows](https://github.com/ragardner/tksheet/wiki/Version-7#table-functionality-and-bindings)
50+
- [Editable Treeview mode](https://github.com/ragardner/tksheet/wiki/Version-7#treeview-mode) with working drag and drop, undo, etc.
5951
- Multiple line header and index cells
6052
- [Expand row heights and column widths](https://github.com/ragardner/tksheet/wiki/Version-7#table-functionality-and-bindings)
6153
- [Change fonts and font size (not for individual cells)](https://github.com/ragardner/tksheet/wiki/Version-7#text-font-and-alignment)
6254
- [Change any colors in the sheet](https://github.com/ragardner/tksheet/wiki/Version-7#sheet-appearance)
63-
- [Treeview mode](https://github.com/ragardner/tksheet/wiki/Version-7#treeview-mode)
55+
6456
- [Dropdown boxes](https://github.com/ragardner/tksheet/wiki/Version-7#dropdown-boxes)
6557
- [Check boxes](https://github.com/ragardner/tksheet/wiki/Version-7#check-boxes)
6658
- [Progress bars](https://github.com/ragardner/tksheet/wiki/Version-7#progress-bars)
6759
- [Hide rows and/or columns](https://github.com/ragardner/tksheet/wiki/Version-7#example-header-dropdown-boxes-and-row-filtering)
6860
- [Left `"w"`, Center `"center"` or Right `"e"` text alignment for any cell/row/column](https://github.com/ragardner/tksheet/wiki/Version-7#text-font-and-alignment)
69-
- [In-built sorting](https://github.com/ragardner/tksheet/wiki/Version-7#sorting-the-table)
61+
- [In-built natural sorting](https://github.com/ragardner/tksheet/wiki/Version-7#sorting-the-table)
7062
- [Optional built-in find window](https://github.com/ragardner/tksheet/wiki/Version-7#table-functionality-and-bindings)
7163

7264
```python
@@ -97,3 +89,12 @@ sheet.delete_columns(columns=[0, 3], undo=True)
9789
### **treeview mode**
9890

9991
![tksheet treeview](https://github.com/user-attachments/assets/159ab987-7612-4db7-98de-1f30c9680247)
92+
93+
## **Changes for versions `7`+:**
94+
95+
- **ALL** `extra_bindings()` event objects have changed, information [here](https://github.com/ragardner/tksheet/wiki/Version-7#bind-specific-table-functionality).
96+
- The bound function for `extra_bindings()` with `"edit_cell"`/`"end_edit_cell"` **no longer** requires a return value and no longer sets the cell to the return value. Use [this](https://github.com/ragardner/tksheet/wiki/Version-7#validate-user-cell-edits) instead.
97+
- `edit_cell_validation` has been removed and replaced with the function `edit_validation()`, information [here](https://github.com/ragardner/tksheet/wiki/Version-7#validate-user-cell-edits).
98+
- Only Python versions >= `3.8` are supported.
99+
- `tksheet` file names have been changed.
100+
- Many other smaller changes, see the [changelog](https://github.com/ragardner/tksheet/blob/master/docs/CHANGELOG.md) for more information.

docs/CHANGELOG.md

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,41 @@
44
- Significant changes to how text is rendered
55
- Removed mousewheel scrolling lines in header, replaced with vertical axis table scroll
66
- Resizing row height to text is now based on the existing column width for the cell/cells, includes double click resizing
7+
- Treeview mode `Node` class now uses `str` for parent and `list[str]` for children attributes
8+
- Function `get_nodes()` renamed -> `get_iids()`
9+
- Removed `data_indexes` parameter from `mapping_move...` functions
10+
- Reduce default treeview indent
11+
- `move()` function now returns the same as other move rows functions
12+
- All `Sheet()` functions with an `undo` parameter have been set to `True` by default
13+
- Using `Sheet.set_data()` or `Span`s to set an individual cell's data as `None` will now do so instead of returning
14+
- Setting `show_top_left` during Sheet() initialization will now make the top left rectangle always show
715

816
#### Added:
17+
- Natural sorting functionality [#238](https://github.com/ragardner/tksheet/issues/238)
18+
- Treeview mode now works with all normal tksheet functions, including dragging and dropping rows
19+
- Cell text overflow `allow_cell_overflow: bool = False` to adjacent cells for left and right alignments, disabled by default
920
- Text wrap for table, header and index
10-
- Natural sorting functionality
1121
```python
1222
# "" no wrap, "w" word wrap, "c" char wrap
1323
table_wrap: Literal["", "w", "c"] = "c",
1424
index_wrap: Literal["", "w", "c"] = "c",
1525
header_wrap: Literal["", "w", "c"] = "c",
1626
```
17-
- Cell text overflow `allow_cell_overflow: bool = False` to adjacent cells for left and right alignments, disabled by default
27+
28+
- `tree` parameter to `insert_rows()` function, used internally
1829

1930
#### Fixed:
2031
- Index fonts now work correctly
2132
- Functions `column_width()` and `row_height()` work correctly for any parameters
2233
- Down sizing rows/columns when scrolled to the end of the axis would result in a rapid movement of row height/column width
34+
- Address [#269](https://github.com/ragardner/tksheet/issues/269)
35+
36+
#### Improved:
37+
- Minor performance improvements for:
38+
- `item_displayed()`
39+
- `show_rows()` / `show_columns()`
40+
- `move()`
41+
- Row insertion
2342

2443
### Version 7.3.4
2544
#### Fixed:

0 commit comments

Comments
 (0)