tksheet 7.4.7__py3-none-any.whl → 7.4.9__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- tksheet/__init__.py +1 -1
- tksheet/column_headers.py +10 -8
- tksheet/constants.py +195 -0
- tksheet/find_window.py +324 -30
- tksheet/functions.py +89 -39
- tksheet/main_table.py +468 -308
- tksheet/row_index.py +15 -15
- tksheet/sheet.py +197 -546
- tksheet/sheet_options.py +4 -0
- tksheet/tksheet_types.py +3 -0
- {tksheet-7.4.7.dist-info → tksheet-7.4.9.dist-info}/METADATA +1 -1
- tksheet-7.4.9.dist-info/RECORD +22 -0
- tksheet-7.4.7.dist-info/RECORD +0 -22
- {tksheet-7.4.7.dist-info → tksheet-7.4.9.dist-info}/LICENSE.txt +0 -0
- {tksheet-7.4.7.dist-info → tksheet-7.4.9.dist-info}/WHEEL +0 -0
- {tksheet-7.4.7.dist-info → tksheet-7.4.9.dist-info}/top_level.txt +0 -0
tksheet/row_index.py
CHANGED
@@ -923,6 +923,7 @@ class RowIndex(tk.Canvas):
|
|
923
923
|
value=val,
|
924
924
|
event_data=event_data,
|
925
925
|
)
|
926
|
+
event_data = self.MT.bulk_edit_validation(event_data)
|
926
927
|
if event_data["cells"]["table"]:
|
927
928
|
if undo and self.MT.undo_enabled:
|
928
929
|
self.MT.undo_stack.append(stored_event_dict(event_data))
|
@@ -1099,7 +1100,7 @@ class RowIndex(tk.Canvas):
|
|
1099
1100
|
self.itemconfig(item, state="hidden")
|
1100
1101
|
|
1101
1102
|
def get_cell_dimensions(self, datarn: int) -> tuple[int, int]:
|
1102
|
-
txt = self.
|
1103
|
+
txt = self.cell_str(datarn, fix=False)
|
1103
1104
|
if txt:
|
1104
1105
|
self.MT.txt_measure_canvas.itemconfig(self.MT.txt_measure_canvas_text, text=txt, font=self.ops.index_font)
|
1105
1106
|
b = self.MT.txt_measure_canvas.bbox(self.MT.txt_measure_canvas_text)
|
@@ -1126,7 +1127,7 @@ class RowIndex(tk.Canvas):
|
|
1126
1127
|
sum(
|
1127
1128
|
1
|
1128
1129
|
for _ in wrap_text(
|
1129
|
-
text=self.
|
1130
|
+
text=self.cell_str(datarn, fix=False),
|
1130
1131
|
max_width=self.current_width,
|
1131
1132
|
max_lines=float("inf"),
|
1132
1133
|
char_width_fn=self.wrap_get_char_w,
|
@@ -1163,16 +1164,14 @@ class RowIndex(tk.Canvas):
|
|
1163
1164
|
else:
|
1164
1165
|
start_col, end_col = 0, len(self.MT.displayed_columns)
|
1165
1166
|
iterable = self.MT.displayed_columns[start_col:end_col]
|
1166
|
-
|
1167
|
-
|
1168
|
-
|
1169
|
-
|
1170
|
-
|
1171
|
-
|
1172
|
-
)
|
1173
|
-
for datacn in iterable
|
1174
|
-
),
|
1167
|
+
cell_heights = (
|
1168
|
+
self.MT.get_wrapped_cell_height(
|
1169
|
+
datarn,
|
1170
|
+
datacn,
|
1171
|
+
)
|
1172
|
+
for datacn in iterable
|
1175
1173
|
)
|
1174
|
+
h = max(h, max(cell_heights, default=h))
|
1176
1175
|
self.MT.cells_cache = None
|
1177
1176
|
h = max(h, ih)
|
1178
1177
|
if only_if_too_small and h < self.MT.row_positions[row + 1] - self.MT.row_positions[row]:
|
@@ -1777,7 +1776,7 @@ class RowIndex(tk.Canvas):
|
|
1777
1776
|
)
|
1778
1777
|
if max_width <= 1:
|
1779
1778
|
continue
|
1780
|
-
text = self.
|
1779
|
+
text = self.cell_str(datarn, fix=False)
|
1781
1780
|
if not text:
|
1782
1781
|
continue
|
1783
1782
|
start_line = max(0, int((scrollpos_top - rtopgridln) / self.MT.index_txt_height))
|
@@ -2458,7 +2457,7 @@ class RowIndex(tk.Canvas):
|
|
2458
2457
|
redirect_int: bool = False,
|
2459
2458
|
) -> Any:
|
2460
2459
|
if get_displayed:
|
2461
|
-
return self.
|
2460
|
+
return self.cell_str(datarn, fix=False)
|
2462
2461
|
if redirect_int and isinstance(self.MT._row_index, int): # internal use
|
2463
2462
|
return self.MT.get_cell_data(datarn, self.MT._row_index, none_to_empty_str=True)
|
2464
2463
|
if (
|
@@ -2472,7 +2471,7 @@ class RowIndex(tk.Canvas):
|
|
2472
2471
|
return self.MT._row_index[datarn].text
|
2473
2472
|
return self.MT._row_index[datarn]
|
2474
2473
|
|
2475
|
-
def
|
2474
|
+
def cell_str(self, datarn: int, fix: bool = True) -> str:
|
2476
2475
|
kwargs = self.get_cell_kwargs(datarn, key="dropdown")
|
2477
2476
|
if kwargs:
|
2478
2477
|
if kwargs["text"] is not None:
|
@@ -2482,7 +2481,7 @@ class RowIndex(tk.Canvas):
|
|
2482
2481
|
if kwargs:
|
2483
2482
|
return f"{kwargs['text']}"
|
2484
2483
|
if isinstance(self.MT._row_index, int):
|
2485
|
-
return self.MT.
|
2484
|
+
return self.MT.cell_str(datarn, self.MT._row_index, get_displayed=True)
|
2486
2485
|
if fix:
|
2487
2486
|
self.fix_index(datarn)
|
2488
2487
|
try:
|
@@ -2732,6 +2731,7 @@ class RowIndex(tk.Canvas):
|
|
2732
2731
|
min_to = min(event_data["moved"]["rows"]["data"].values())
|
2733
2732
|
max_to = max(event_data["moved"]["rows"]["data"].values())
|
2734
2733
|
insert_row = max_to if min_from <= min_to else min_to
|
2734
|
+
move_to_row = insert_row
|
2735
2735
|
move_to_iid = self.MT._row_index[insert_row].iid
|
2736
2736
|
|
2737
2737
|
move_to_index = self.PAR.index(move_to_iid)
|