tksheet 7.4.13__py3-none-any.whl → 7.4.14__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 +91 -76
- tksheet/find_window.py +2 -0
- tksheet/main_table.py +473 -455
- tksheet/row_index.py +91 -85
- tksheet/sheet.py +8 -6
- {tksheet-7.4.13.dist-info → tksheet-7.4.14.dist-info}/METADATA +1 -1
- {tksheet-7.4.13.dist-info → tksheet-7.4.14.dist-info}/RECORD +11 -11
- {tksheet-7.4.13.dist-info → tksheet-7.4.14.dist-info}/LICENSE.txt +0 -0
- {tksheet-7.4.13.dist-info → tksheet-7.4.14.dist-info}/WHEEL +0 -0
- {tksheet-7.4.13.dist-info → tksheet-7.4.14.dist-info}/top_level.txt +0 -0
tksheet/row_index.py
CHANGED
@@ -7,7 +7,7 @@ from contextlib import suppress
|
|
7
7
|
from functools import partial
|
8
8
|
from itertools import cycle, islice, repeat
|
9
9
|
from math import ceil
|
10
|
-
from
|
10
|
+
from re import findall
|
11
11
|
from typing import Any, Literal
|
12
12
|
|
13
13
|
from .colors import color_map
|
@@ -1058,14 +1058,16 @@ class RowIndex(tk.Canvas):
|
|
1058
1058
|
def get_cell_dimensions(self, datarn: int) -> tuple[int, int]:
|
1059
1059
|
txt = self.cell_str(datarn, fix=False)
|
1060
1060
|
if txt:
|
1061
|
-
|
1062
|
-
|
1063
|
-
w =
|
1064
|
-
h = b[3] - b[1] + 5
|
1061
|
+
lines = findall(r"[^\n]+", txt)
|
1062
|
+
h = self.MT.index_txt_height * len(lines) + 5
|
1063
|
+
w = max(sum(self.wrap_get_char_w(c) for c in line) for line in lines) + 8
|
1065
1064
|
else:
|
1066
1065
|
w = self.ops.default_row_index_width
|
1067
1066
|
h = self.MT.min_row_height
|
1068
|
-
|
1067
|
+
# self.get_cell_kwargs not used here to boost performance
|
1068
|
+
if (datarn in self.cell_options and "dropdown" in self.cell_options[datarn]) or (
|
1069
|
+
datarn in self.cell_options and "checkbox" in self.cell_options[datarn]
|
1070
|
+
):
|
1069
1071
|
w += self.MT.index_txt_height + 2
|
1070
1072
|
if self.ops.treeview:
|
1071
1073
|
if datarn in self.cell_options and "align" in self.cell_options[datarn]:
|
@@ -1077,6 +1079,27 @@ class RowIndex(tk.Canvas):
|
|
1077
1079
|
w += self.get_iid_indent(self.MT._row_index[datarn].iid) + 10
|
1078
1080
|
return w, h
|
1079
1081
|
|
1082
|
+
def get_cell_width(self, datarn: int) -> int:
|
1083
|
+
txt = self.cell_str(datarn, fix=False)
|
1084
|
+
if txt:
|
1085
|
+
w = max(sum(self.wrap_get_char_w(c) for c in line) for line in findall(r"[^\n]+", txt)) + 8
|
1086
|
+
else:
|
1087
|
+
w = self.ops.default_row_index_width
|
1088
|
+
# self.get_cell_kwargs not used here to boost performance
|
1089
|
+
if (datarn in self.cell_options and "dropdown" in self.cell_options[datarn]) or (
|
1090
|
+
datarn in self.cell_options and "checkbox" in self.cell_options[datarn]
|
1091
|
+
):
|
1092
|
+
w += self.MT.index_txt_height + 2
|
1093
|
+
if self.ops.treeview:
|
1094
|
+
if datarn in self.cell_options and "align" in self.cell_options[datarn]:
|
1095
|
+
align = self.cell_options[datarn]["align"]
|
1096
|
+
else:
|
1097
|
+
align = self.align
|
1098
|
+
if align[-1] == "w":
|
1099
|
+
w += self.MT.index_txt_height
|
1100
|
+
w += self.get_iid_indent(self.MT._row_index[datarn].iid) + 10
|
1101
|
+
return w
|
1102
|
+
|
1080
1103
|
def get_wrapped_cell_height(self, datarn: int) -> int:
|
1081
1104
|
n_lines = max(
|
1082
1105
|
1,
|
@@ -1161,10 +1184,7 @@ class RowIndex(tk.Canvas):
|
|
1161
1184
|
self.MT.recreate_all_selection_boxes()
|
1162
1185
|
return height
|
1163
1186
|
|
1164
|
-
def get_index_text_width(
|
1165
|
-
self,
|
1166
|
-
only_rows: Iterator[int] | None = None,
|
1167
|
-
) -> int:
|
1187
|
+
def get_index_text_width(self, only_rows: Iterator[int] | None = None) -> int:
|
1168
1188
|
self.fix_index()
|
1169
1189
|
w = self.ops.default_row_index_width
|
1170
1190
|
if (not self.MT._row_index and isinstance(self.MT._row_index, list)) or (
|
@@ -1180,7 +1200,7 @@ class RowIndex(tk.Canvas):
|
|
1180
1200
|
iterable = range(len(self.MT.data))
|
1181
1201
|
else:
|
1182
1202
|
iterable = self.MT.displayed_rows
|
1183
|
-
if (new_w := max(map(
|
1203
|
+
if (new_w := max(map(self.get_cell_width, iterable), default=w)) > w:
|
1184
1204
|
w = new_w
|
1185
1205
|
if w > self.ops.max_index_width:
|
1186
1206
|
w = int(self.ops.max_index_width)
|
@@ -1235,11 +1255,11 @@ class RowIndex(tk.Canvas):
|
|
1235
1255
|
def auto_set_index_width(self, end_row: int, only_rows: list) -> bool:
|
1236
1256
|
if not isinstance(self.MT._row_index, int) and not self.MT._row_index:
|
1237
1257
|
if self.ops.default_row_index == "letters":
|
1238
|
-
new_w = self.
|
1258
|
+
new_w = sum(self.wrap_get_char_w(c) for c in num2alpha(end_row)) + 20
|
1239
1259
|
elif self.ops.default_row_index == "numbers":
|
1240
|
-
new_w = self.
|
1260
|
+
new_w = sum(self.wrap_get_char_w(c) for c in str(end_row)) + 20
|
1241
1261
|
elif self.ops.default_row_index == "both":
|
1242
|
-
new_w = self.
|
1262
|
+
new_w = sum(self.wrap_get_char_w(c) for c in f"{end_row + 1} {num2alpha(end_row)}") + 20
|
1243
1263
|
elif self.ops.default_row_index is None:
|
1244
1264
|
new_w = 20
|
1245
1265
|
elif self.ops.auto_resize_row_index is True:
|
@@ -1306,7 +1326,6 @@ class RowIndex(tk.Canvas):
|
|
1306
1326
|
sr,
|
1307
1327
|
fill=fill,
|
1308
1328
|
outline=self.ops.index_fg if has_dd and self.ops.show_dropdown_borders else "",
|
1309
|
-
tag="s",
|
1310
1329
|
)
|
1311
1330
|
tree_arrow_fg = txtfg
|
1312
1331
|
elif not kwargs:
|
@@ -1320,7 +1339,6 @@ class RowIndex(tk.Canvas):
|
|
1320
1339
|
sr,
|
1321
1340
|
fill=self.ops.index_selected_rows_bg,
|
1322
1341
|
outline=self.ops.index_fg if has_dd and self.ops.show_dropdown_borders else "",
|
1323
|
-
tag="s",
|
1324
1342
|
)
|
1325
1343
|
elif "cells" in selections and r in selections["cells"]:
|
1326
1344
|
txtfg = self.ops.index_selected_cells_fg
|
@@ -1332,7 +1350,6 @@ class RowIndex(tk.Canvas):
|
|
1332
1350
|
sr,
|
1333
1351
|
fill=self.ops.index_selected_cells_bg,
|
1334
1352
|
outline=self.ops.index_fg if has_dd and self.ops.show_dropdown_borders else "",
|
1335
|
-
tag="s",
|
1336
1353
|
)
|
1337
1354
|
else:
|
1338
1355
|
txtfg = self.ops.index_fg
|
@@ -1347,7 +1364,6 @@ class RowIndex(tk.Canvas):
|
|
1347
1364
|
y2: float,
|
1348
1365
|
fill: str,
|
1349
1366
|
outline: str,
|
1350
|
-
tag: str | tuple[str],
|
1351
1367
|
) -> bool:
|
1352
1368
|
coords = (x1, y1, x2, y2)
|
1353
1369
|
if self.hidd_high:
|
@@ -1356,10 +1372,9 @@ class RowIndex(tk.Canvas):
|
|
1356
1372
|
if showing:
|
1357
1373
|
self.itemconfig(iid, fill=fill, outline=outline)
|
1358
1374
|
else:
|
1359
|
-
self.itemconfig(iid, fill=fill, outline=outline,
|
1360
|
-
self.tag_raise(iid)
|
1375
|
+
self.itemconfig(iid, fill=fill, outline=outline, state="normal")
|
1361
1376
|
else:
|
1362
|
-
iid = self.create_rectangle(coords, fill=fill, outline=outline
|
1377
|
+
iid = self.create_rectangle(coords, fill=fill, outline=outline)
|
1363
1378
|
self.disp_high[iid] = True
|
1364
1379
|
return True
|
1365
1380
|
|
@@ -1368,18 +1383,17 @@ class RowIndex(tk.Canvas):
|
|
1368
1383
|
points: tuple[float],
|
1369
1384
|
fill: str,
|
1370
1385
|
width: int,
|
1371
|
-
tag: str | tuple[str],
|
1372
1386
|
) -> None:
|
1373
1387
|
if self.hidd_grid:
|
1374
1388
|
t, sh = self.hidd_grid.popitem()
|
1375
1389
|
self.coords(t, points)
|
1376
1390
|
if sh:
|
1377
|
-
self.itemconfig(t, fill=fill, width=width
|
1391
|
+
self.itemconfig(t, fill=fill, width=width)
|
1378
1392
|
else:
|
1379
|
-
self.itemconfig(t, fill=fill, width=width,
|
1393
|
+
self.itemconfig(t, fill=fill, width=width, state="normal")
|
1380
1394
|
self.disp_grid[t] = True
|
1381
1395
|
else:
|
1382
|
-
self.disp_grid[self.create_line(points, fill=fill, width=width
|
1396
|
+
self.disp_grid[self.create_line(points, fill=fill, width=width)] = True
|
1383
1397
|
|
1384
1398
|
def redraw_tree_arrow(
|
1385
1399
|
self,
|
@@ -1387,7 +1401,6 @@ class RowIndex(tk.Canvas):
|
|
1387
1401
|
y1: float,
|
1388
1402
|
y2: float,
|
1389
1403
|
fill: str,
|
1390
|
-
tag: str | tuple[str],
|
1391
1404
|
indent: float,
|
1392
1405
|
has_children: bool = False,
|
1393
1406
|
open_: bool = False,
|
@@ -1460,16 +1473,15 @@ class RowIndex(tk.Canvas):
|
|
1460
1473
|
if sh:
|
1461
1474
|
self.itemconfig(t, fill=fill if has_children else self.ops.index_grid_fg)
|
1462
1475
|
else:
|
1463
|
-
self.itemconfig(t, fill=fill if has_children else self.ops.index_grid_fg,
|
1464
|
-
self.lift(t)
|
1476
|
+
self.itemconfig(t, fill=fill if has_children else self.ops.index_grid_fg, state="normal")
|
1465
1477
|
else:
|
1466
1478
|
t = self.create_line(
|
1467
1479
|
points,
|
1468
1480
|
fill=fill if has_children else self.ops.index_grid_fg,
|
1469
|
-
tag=tag,
|
1470
1481
|
width=2,
|
1471
1482
|
capstyle=tk.ROUND,
|
1472
1483
|
joinstyle=tk.BEVEL,
|
1484
|
+
tag="lift",
|
1473
1485
|
)
|
1474
1486
|
self.disp_tree_arrow[t] = True
|
1475
1487
|
|
@@ -1481,13 +1493,12 @@ class RowIndex(tk.Canvas):
|
|
1481
1493
|
y2: float,
|
1482
1494
|
fill: str,
|
1483
1495
|
outline: str,
|
1484
|
-
tag: str | tuple[str],
|
1485
1496
|
draw_outline: bool = True,
|
1486
1497
|
draw_arrow: bool = True,
|
1487
1498
|
open_: bool = False,
|
1488
1499
|
) -> None:
|
1489
1500
|
if draw_outline and self.ops.show_dropdown_borders:
|
1490
|
-
self.redraw_highlight(x1 + 1, y1 + 1, x2, y2, fill="", outline=self.ops.index_fg
|
1501
|
+
self.redraw_highlight(x1 + 1, y1 + 1, x2, y2, fill="", outline=self.ops.index_fg)
|
1491
1502
|
if draw_arrow:
|
1492
1503
|
mod = (self.MT.index_txt_height - 1) if self.MT.index_txt_height % 2 else self.MT.index_txt_height
|
1493
1504
|
small_mod = int(mod / 5)
|
@@ -1518,16 +1529,15 @@ class RowIndex(tk.Canvas):
|
|
1518
1529
|
if sh:
|
1519
1530
|
self.itemconfig(t, fill=fill)
|
1520
1531
|
else:
|
1521
|
-
self.itemconfig(t, fill=fill,
|
1522
|
-
self.lift(t)
|
1532
|
+
self.itemconfig(t, fill=fill, state="normal")
|
1523
1533
|
else:
|
1524
1534
|
t = self.create_line(
|
1525
1535
|
points,
|
1526
1536
|
fill=fill,
|
1527
|
-
tag=tag,
|
1528
1537
|
width=2,
|
1529
1538
|
capstyle=tk.ROUND,
|
1530
1539
|
joinstyle=tk.BEVEL,
|
1540
|
+
tag="lift",
|
1531
1541
|
)
|
1532
1542
|
self.disp_dropdown[t] = True
|
1533
1543
|
|
@@ -1539,7 +1549,6 @@ class RowIndex(tk.Canvas):
|
|
1539
1549
|
y2: float,
|
1540
1550
|
fill: str,
|
1541
1551
|
outline: str,
|
1542
|
-
tag: str | tuple[str],
|
1543
1552
|
draw_check: bool = False,
|
1544
1553
|
) -> None:
|
1545
1554
|
points = rounded_box_coords(x1, y1, x2, y2)
|
@@ -1549,10 +1558,9 @@ class RowIndex(tk.Canvas):
|
|
1549
1558
|
if sh:
|
1550
1559
|
self.itemconfig(t, fill=outline, outline=fill)
|
1551
1560
|
else:
|
1552
|
-
self.itemconfig(t, fill=outline, outline=fill,
|
1553
|
-
self.lift(t)
|
1561
|
+
self.itemconfig(t, fill=outline, outline=fill, state="normal")
|
1554
1562
|
else:
|
1555
|
-
t = self.create_polygon(points, fill=outline, outline=fill,
|
1563
|
+
t = self.create_polygon(points, fill=outline, outline=fill, smooth=True, tag="lift")
|
1556
1564
|
self.disp_checkbox[t] = True
|
1557
1565
|
if draw_check:
|
1558
1566
|
# draw filled box
|
@@ -1567,10 +1575,9 @@ class RowIndex(tk.Canvas):
|
|
1567
1575
|
if sh:
|
1568
1576
|
self.itemconfig(t, fill=fill, outline=outline)
|
1569
1577
|
else:
|
1570
|
-
self.itemconfig(t, fill=fill, outline=outline,
|
1571
|
-
self.lift(t)
|
1578
|
+
self.itemconfig(t, fill=fill, outline=outline, state="normal")
|
1572
1579
|
else:
|
1573
|
-
t = self.create_polygon(points, fill=fill, outline=outline,
|
1580
|
+
t = self.create_polygon(points, fill=fill, outline=outline, smooth=True, tag="lift")
|
1574
1581
|
self.disp_checkbox[t] = True
|
1575
1582
|
|
1576
1583
|
def configure_scrollregion(self, last_row_line_pos: float) -> bool:
|
@@ -1588,15 +1595,15 @@ class RowIndex(tk.Canvas):
|
|
1588
1595
|
return False
|
1589
1596
|
|
1590
1597
|
def wrap_get_char_w(self, c: str) -> int:
|
1591
|
-
self.MT.txt_measure_canvas.itemconfig(
|
1592
|
-
self.MT.txt_measure_canvas_text,
|
1593
|
-
text=_test_str + c,
|
1594
|
-
font=self.index_font,
|
1595
|
-
)
|
1596
|
-
b = self.MT.txt_measure_canvas.bbox(self.MT.txt_measure_canvas_text)
|
1597
1598
|
if c in self.MT.char_widths[self.index_font]:
|
1598
1599
|
return self.MT.char_widths[self.index_font][c]
|
1599
1600
|
else:
|
1601
|
+
self.MT.txt_measure_canvas.itemconfig(
|
1602
|
+
self.MT.txt_measure_canvas_text,
|
1603
|
+
text=_test_str + c,
|
1604
|
+
font=self.index_font,
|
1605
|
+
)
|
1606
|
+
b = self.MT.txt_measure_canvas.bbox(self.MT.txt_measure_canvas_text)
|
1600
1607
|
wd = b[2] - b[0] - self.index_test_str_w
|
1601
1608
|
self.MT.char_widths[self.index_font][c] = wd
|
1602
1609
|
return wd
|
@@ -1635,6 +1642,35 @@ class RowIndex(tk.Canvas):
|
|
1635
1642
|
self.current_width,
|
1636
1643
|
scrollpos_bot,
|
1637
1644
|
)
|
1645
|
+
|
1646
|
+
if (self.ops.show_horizontal_grid or self.height_resizing_enabled) and row_pos_exists:
|
1647
|
+
xend = self.current_width - 6
|
1648
|
+
points = [
|
1649
|
+
self.current_width - 1,
|
1650
|
+
y_stop - 1,
|
1651
|
+
self.current_width - 1,
|
1652
|
+
scrollpos_top - 1,
|
1653
|
+
-1,
|
1654
|
+
scrollpos_top - 1,
|
1655
|
+
]
|
1656
|
+
for r in range(grid_start_row, grid_end_row):
|
1657
|
+
draw_y = self.MT.row_positions[r]
|
1658
|
+
if r and self.height_resizing_enabled:
|
1659
|
+
self.visible_row_dividers[r] = (1, draw_y - 2, xend, draw_y + 2)
|
1660
|
+
points.extend(
|
1661
|
+
(
|
1662
|
+
-1,
|
1663
|
+
draw_y,
|
1664
|
+
self.current_width,
|
1665
|
+
draw_y,
|
1666
|
+
-1,
|
1667
|
+
draw_y,
|
1668
|
+
-1,
|
1669
|
+
self.MT.row_positions[r + 1] if len(self.MT.row_positions) - 1 > r else draw_y,
|
1670
|
+
)
|
1671
|
+
)
|
1672
|
+
self.redraw_gridline(points=points, fill=self.ops.index_grid_fg, width=1)
|
1673
|
+
|
1638
1674
|
sel_cells_bg = (
|
1639
1675
|
self.ops.index_selected_cells_bg
|
1640
1676
|
if self.ops.index_selected_cells_bg.startswith("#")
|
@@ -1688,7 +1724,6 @@ class RowIndex(tk.Canvas):
|
|
1688
1724
|
rbotgridln - 1,
|
1689
1725
|
fill=fill if dropdown_kwargs["state"] != "disabled" else self.ops.index_grid_fg,
|
1690
1726
|
outline=fill,
|
1691
|
-
tag="dd",
|
1692
1727
|
draw_outline=not dd_drawn,
|
1693
1728
|
draw_arrow=True,
|
1694
1729
|
open_=dd_coords == r,
|
@@ -1727,7 +1762,6 @@ class RowIndex(tk.Canvas):
|
|
1727
1762
|
rtopgridln + self.MT.index_txt_height + 3,
|
1728
1763
|
fill=fill if checkbox_kwargs["state"] == "normal" else self.ops.index_grid_fg,
|
1729
1764
|
outline="",
|
1730
|
-
tag="cb",
|
1731
1765
|
draw_check=draw_check,
|
1732
1766
|
)
|
1733
1767
|
if treeview and isinstance(self.MT._row_index, list) and len(self.MT._row_index) > datarn:
|
@@ -1742,7 +1776,6 @@ class RowIndex(tk.Canvas):
|
|
1742
1776
|
rtopgridln,
|
1743
1777
|
rbotgridln - 1,
|
1744
1778
|
fill=tree_arrow_fg,
|
1745
|
-
tag="ta",
|
1746
1779
|
indent=indent,
|
1747
1780
|
has_children=bool(self.MT._row_index[datarn].children),
|
1748
1781
|
open_=self.MT._row_index[datarn].iid in self.tree_open_ids,
|
@@ -1764,7 +1797,7 @@ class RowIndex(tk.Canvas):
|
|
1764
1797
|
wrap=wrap,
|
1765
1798
|
start_line=start_line,
|
1766
1799
|
)
|
1767
|
-
if align
|
1800
|
+
if align[-1] == "w" or align[-1] == "e":
|
1768
1801
|
if self.hidd_text:
|
1769
1802
|
iid, showing = self.hidd_text.popitem()
|
1770
1803
|
self.coords(iid, draw_x, draw_y)
|
@@ -1793,18 +1826,18 @@ class RowIndex(tk.Canvas):
|
|
1793
1826
|
fill=fill,
|
1794
1827
|
font=font,
|
1795
1828
|
anchor=align,
|
1796
|
-
|
1829
|
+
tag="lift",
|
1797
1830
|
)
|
1798
1831
|
self.disp_text[iid] = True
|
1799
1832
|
else:
|
1800
|
-
for
|
1833
|
+
for line in gen_lines:
|
1801
1834
|
if self.hidd_text:
|
1802
1835
|
iid, showing = self.hidd_text.popitem()
|
1803
1836
|
self.coords(iid, draw_x, draw_y)
|
1804
1837
|
if showing:
|
1805
1838
|
self.itemconfig(
|
1806
1839
|
iid,
|
1807
|
-
text=
|
1840
|
+
text=line,
|
1808
1841
|
fill=fill,
|
1809
1842
|
font=font,
|
1810
1843
|
anchor=align,
|
@@ -1812,7 +1845,7 @@ class RowIndex(tk.Canvas):
|
|
1812
1845
|
else:
|
1813
1846
|
self.itemconfig(
|
1814
1847
|
iid,
|
1815
|
-
text=
|
1848
|
+
text=line,
|
1816
1849
|
fill=fill,
|
1817
1850
|
font=font,
|
1818
1851
|
anchor=align,
|
@@ -1822,42 +1855,15 @@ class RowIndex(tk.Canvas):
|
|
1822
1855
|
iid = self.create_text(
|
1823
1856
|
draw_x,
|
1824
1857
|
draw_y,
|
1825
|
-
text=
|
1858
|
+
text=line,
|
1826
1859
|
fill=fill,
|
1827
1860
|
font=font,
|
1828
1861
|
anchor=align,
|
1829
|
-
|
1862
|
+
tag="lift",
|
1830
1863
|
)
|
1831
1864
|
self.disp_text[iid] = True
|
1832
1865
|
draw_y += self.MT.header_txt_height
|
1833
1866
|
|
1834
|
-
xend = self.current_width - 6
|
1835
|
-
if (self.ops.show_horizontal_grid or self.height_resizing_enabled) and row_pos_exists:
|
1836
|
-
points = [
|
1837
|
-
self.current_width - 1,
|
1838
|
-
y_stop - 1,
|
1839
|
-
self.current_width - 1,
|
1840
|
-
scrollpos_top - 1,
|
1841
|
-
-1,
|
1842
|
-
scrollpos_top - 1,
|
1843
|
-
]
|
1844
|
-
for r in range(grid_start_row, grid_end_row):
|
1845
|
-
draw_y = self.MT.row_positions[r]
|
1846
|
-
if r and self.height_resizing_enabled:
|
1847
|
-
self.visible_row_dividers[r] = (1, draw_y - 2, xend, draw_y + 2)
|
1848
|
-
points.extend(
|
1849
|
-
(
|
1850
|
-
-1,
|
1851
|
-
draw_y,
|
1852
|
-
self.current_width,
|
1853
|
-
draw_y,
|
1854
|
-
-1,
|
1855
|
-
draw_y,
|
1856
|
-
-1,
|
1857
|
-
self.MT.row_positions[r + 1] if len(self.MT.row_positions) - 1 > r else draw_y,
|
1858
|
-
)
|
1859
|
-
)
|
1860
|
-
self.redraw_gridline(points=points, fill=self.ops.index_grid_fg, width=1, tag="h")
|
1861
1867
|
for dct in (
|
1862
1868
|
self.hidd_text,
|
1863
1869
|
self.hidd_high,
|
@@ -1870,7 +1876,7 @@ class RowIndex(tk.Canvas):
|
|
1870
1876
|
if showing:
|
1871
1877
|
self.itemconfig(iid, state="hidden")
|
1872
1878
|
dct[iid] = False
|
1873
|
-
self.tag_raise("
|
1879
|
+
self.tag_raise("lift")
|
1874
1880
|
if self.disp_resize_lines:
|
1875
1881
|
self.tag_raise("rh")
|
1876
1882
|
return True
|
tksheet/sheet.py
CHANGED
@@ -1726,12 +1726,14 @@ class Sheet(tk.Frame):
|
|
1726
1726
|
len_check = (total_cols + 1) if row_index else total_cols
|
1727
1727
|
for rn, r in enumerate(rows):
|
1728
1728
|
if len_check > (lnr := len(r)):
|
1729
|
-
r
|
1730
|
-
|
1731
|
-
|
1732
|
-
|
1733
|
-
|
1734
|
-
|
1729
|
+
r.extend(
|
1730
|
+
self.MT.gen_empty_row_seq(
|
1731
|
+
rn,
|
1732
|
+
end=total_cols,
|
1733
|
+
start=(lnr - 1) if row_index else lnr,
|
1734
|
+
r_ops=False,
|
1735
|
+
c_ops=False,
|
1736
|
+
)
|
1735
1737
|
)
|
1736
1738
|
event_data = self.MT.add_rows(
|
1737
1739
|
*self.MT.get_args_for_add_rows(
|
@@ -1,22 +1,22 @@
|
|
1
|
-
tksheet/__init__.py,sha256=
|
1
|
+
tksheet/__init__.py,sha256=3PPVPpSjy9UW907gQGNjDApgWzFv0DikuRVnuAo3nAc,2327
|
2
2
|
tksheet/colors.py,sha256=dHhmdFuQDlwohDHsAfT9VdrKoSl_R33L72a3HCin5zo,51591
|
3
|
-
tksheet/column_headers.py,sha256=
|
3
|
+
tksheet/column_headers.py,sha256=POoLTtR8qvrRYJl1c7WMc6UiDxfoNxhLUC2ikcEzt1M,103446
|
4
4
|
tksheet/constants.py,sha256=aiDvUSaPtl_TSNtRRJ_p87c9iTBz9ksMd5IsSXzz4Hk,13316
|
5
|
-
tksheet/find_window.py,sha256=
|
5
|
+
tksheet/find_window.py,sha256=w6S0FZFLRNHiM57Oq97avALT_PctIBPegSxnkNUwkwk,19982
|
6
6
|
tksheet/formatters.py,sha256=DGcRiMsDJnySNpQcjfiX84oJ7TmOSMdU6u9injIhA4g,10095
|
7
7
|
tksheet/functions.py,sha256=qks2dLqBE9GMAuEXaA4qiU-rrL-dzmz4-tkmkp6_ETk,53037
|
8
|
-
tksheet/main_table.py,sha256=
|
8
|
+
tksheet/main_table.py,sha256=dNpljN59pWIQ_QPBUKuZjxJMZw723neMQFkfSAP1sJI,366079
|
9
9
|
tksheet/other_classes.py,sha256=B2SrUAviztDUOPGoWkcu-AixqAaKwItshoVZPGe1_Tc,16662
|
10
|
-
tksheet/row_index.py,sha256=
|
11
|
-
tksheet/sheet.py,sha256=
|
10
|
+
tksheet/row_index.py,sha256=a0W78zqZIXVxfzyF5yYfXu1iUXnnDcK0ESodLl6joiA,141720
|
11
|
+
tksheet/sheet.py,sha256=nQES3tqopDmmyL7j7YKDjZRdfVVhmgzQ-2srII6COgE,269766
|
12
12
|
tksheet/sheet_options.py,sha256=ob-XYgGfBoi2TaFAvUUmlWUkw9xB-yXmJw17gu9__Lw,9948
|
13
13
|
tksheet/sorting.py,sha256=zcZPpRtP1h_xJGtGkG3E43H7deKQFnh9cMwZ1B2-aGc,17502
|
14
14
|
tksheet/text_editor.py,sha256=rU8Fz0-ltkM63W9io2DoZJPyzUGzCc9Z0qBtc4D1H40,7404
|
15
15
|
tksheet/themes.py,sha256=AoNAxibnQi04MN0Zpbn9-kyDnkiiV8TDNWP9FYjpuf0,18473
|
16
16
|
tksheet/tksheet_types.py,sha256=1MjXR34EmvP1KfHlLTvKKVnf0VMz_LU_WOM2q4o5hfI,4598
|
17
17
|
tksheet/top_left_rectangle.py,sha256=M52IrPIeMoYE3jSpooZmqw_0W5Fz_R-Yu1ZqA685EZ8,8557
|
18
|
-
tksheet-7.4.
|
19
|
-
tksheet-7.4.
|
20
|
-
tksheet-7.4.
|
21
|
-
tksheet-7.4.
|
22
|
-
tksheet-7.4.
|
18
|
+
tksheet-7.4.14.dist-info/LICENSE.txt,sha256=ndbcCPe9SlHfweE_W2RAueWUe2k7yudyxYLq6WjFdn4,1101
|
19
|
+
tksheet-7.4.14.dist-info/METADATA,sha256=F1Yoinb1DWdw_m765tlha6ae7vnxGbhw-7wDlE325cw,8095
|
20
|
+
tksheet-7.4.14.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
|
21
|
+
tksheet-7.4.14.dist-info/top_level.txt,sha256=my61PXCcck_HHAc9cq3NAlyAr3A3FXxCy9gptEOaCN8,8
|
22
|
+
tksheet-7.4.14.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|