tksheet 7.5.10__tar.gz → 7.5.12__tar.gz

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.
Files changed (28) hide show
  1. {tksheet-7.5.10/tksheet.egg-info → tksheet-7.5.12}/PKG-INFO +4 -5
  2. {tksheet-7.5.10 → tksheet-7.5.12}/README.md +3 -4
  3. {tksheet-7.5.10 → tksheet-7.5.12}/pyproject.toml +1 -1
  4. {tksheet-7.5.10 → tksheet-7.5.12}/tksheet/__init__.py +1 -1
  5. {tksheet-7.5.10 → tksheet-7.5.12}/tksheet/column_headers.py +51 -37
  6. {tksheet-7.5.10 → tksheet-7.5.12}/tksheet/functions.py +11 -1
  7. {tksheet-7.5.10 → tksheet-7.5.12}/tksheet/main_table.py +68 -43
  8. {tksheet-7.5.10 → tksheet-7.5.12}/tksheet/row_index.py +51 -38
  9. {tksheet-7.5.10 → tksheet-7.5.12}/tksheet/sheet.py +28 -26
  10. {tksheet-7.5.10 → tksheet-7.5.12}/tksheet/sheet_options.py +1 -0
  11. {tksheet-7.5.10 → tksheet-7.5.12}/tksheet/tooltip.py +3 -3
  12. {tksheet-7.5.10 → tksheet-7.5.12/tksheet.egg-info}/PKG-INFO +4 -5
  13. {tksheet-7.5.10 → tksheet-7.5.12}/LICENSE.txt +0 -0
  14. {tksheet-7.5.10 → tksheet-7.5.12}/setup.cfg +0 -0
  15. {tksheet-7.5.10 → tksheet-7.5.12}/tksheet/colors.py +0 -0
  16. {tksheet-7.5.10 → tksheet-7.5.12}/tksheet/constants.py +0 -0
  17. {tksheet-7.5.10 → tksheet-7.5.12}/tksheet/find_window.py +0 -0
  18. {tksheet-7.5.10 → tksheet-7.5.12}/tksheet/formatters.py +0 -0
  19. {tksheet-7.5.10 → tksheet-7.5.12}/tksheet/menus.py +0 -0
  20. {tksheet-7.5.10 → tksheet-7.5.12}/tksheet/other_classes.py +0 -0
  21. {tksheet-7.5.10 → tksheet-7.5.12}/tksheet/sorting.py +0 -0
  22. {tksheet-7.5.10 → tksheet-7.5.12}/tksheet/text_editor.py +0 -0
  23. {tksheet-7.5.10 → tksheet-7.5.12}/tksheet/themes.py +0 -0
  24. {tksheet-7.5.10 → tksheet-7.5.12}/tksheet/tksheet_types.py +0 -0
  25. {tksheet-7.5.10 → tksheet-7.5.12}/tksheet/top_left_rectangle.py +0 -0
  26. {tksheet-7.5.10 → tksheet-7.5.12}/tksheet.egg-info/SOURCES.txt +0 -0
  27. {tksheet-7.5.10 → tksheet-7.5.12}/tksheet.egg-info/dependency_links.txt +0 -0
  28. {tksheet-7.5.10 → tksheet-7.5.12}/tksheet.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tksheet
3
- Version: 7.5.10
3
+ Version: 7.5.12
4
4
  Summary: Tkinter table / sheet and treeview widget
5
5
  Author-email: ragardner <github@ragardner.simplelogin.com>
6
6
  License: Copyright (c) 2019 ragardner and open source contributors
@@ -77,6 +77,8 @@ Dynamic: license-file
77
77
 
78
78
  [![GitHub Release Date](https://img.shields.io/github/release-date-pre/ragardner/tksheet.svg)](https://github.com/ragardner/tksheet/releases) [![Downloads](https://img.shields.io/pypi/dm/tksheet.svg)](https://pypi.org/project/tksheet/)
79
79
 
80
+ With apologies, development of this library has ceased except for bug fixes or behavioral issues. Pull requests for other changes are unlikely to be merged.
81
+
80
82
  <table>
81
83
  <thead>
82
84
  <tr>
@@ -95,14 +97,11 @@ Dynamic: license-file
95
97
  <tr>
96
98
  <td align="right" colspan="2"><a href="https://github.com/ragardner/tksheet/blob/master/docs/CHANGELOG.md" target="_blank">Changelog</a></td>
97
99
  </tr>
98
- <tr>
99
- <td align="right" colspan="2"><a href="https://github.com/ragardner/tksheet/wiki/Version-7#asking-questions" target="_blank">Questions</a></td>
100
- </tr>
101
100
  <tr>
102
101
  <td align="right" colspan="2"><a href="https://github.com/ragardner/tksheet/wiki/Version-7#issues" target="_blank">Issues</a></td>
103
102
  </tr>
104
103
  <tr>
105
- <td align="right" colspan="2"><a href="https://github.com/ragardner/tksheet/wiki/Version-7#enhancements-or-suggestions" target="_blank">Suggestions and Contributors</a></td>
104
+ <td align="right" colspan="2"><a href="https://github.com/ragardner/tksheet/wiki/Version-7#contributions-and-special-thanks" target="_blank">Contributions and Thanks</a></td>
106
105
  </tr>
107
106
  </tbody>
108
107
  </table>
@@ -9,6 +9,8 @@
9
9
 
10
10
  [![GitHub Release Date](https://img.shields.io/github/release-date-pre/ragardner/tksheet.svg)](https://github.com/ragardner/tksheet/releases) [![Downloads](https://img.shields.io/pypi/dm/tksheet.svg)](https://pypi.org/project/tksheet/)
11
11
 
12
+ With apologies, development of this library has ceased except for bug fixes or behavioral issues. Pull requests for other changes are unlikely to be merged.
13
+
12
14
  <table>
13
15
  <thead>
14
16
  <tr>
@@ -27,14 +29,11 @@
27
29
  <tr>
28
30
  <td align="right" colspan="2"><a href="https://github.com/ragardner/tksheet/blob/master/docs/CHANGELOG.md" target="_blank">Changelog</a></td>
29
31
  </tr>
30
- <tr>
31
- <td align="right" colspan="2"><a href="https://github.com/ragardner/tksheet/wiki/Version-7#asking-questions" target="_blank">Questions</a></td>
32
- </tr>
33
32
  <tr>
34
33
  <td align="right" colspan="2"><a href="https://github.com/ragardner/tksheet/wiki/Version-7#issues" target="_blank">Issues</a></td>
35
34
  </tr>
36
35
  <tr>
37
- <td align="right" colspan="2"><a href="https://github.com/ragardner/tksheet/wiki/Version-7#enhancements-or-suggestions" target="_blank">Suggestions and Contributors</a></td>
36
+ <td align="right" colspan="2"><a href="https://github.com/ragardner/tksheet/wiki/Version-7#contributions-and-special-thanks" target="_blank">Contributions and Thanks</a></td>
38
37
  </tr>
39
38
  </tbody>
40
39
  </table>
@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
6
6
  name = "tksheet"
7
7
  description = "Tkinter table / sheet and treeview widget"
8
8
  readme = "README.md"
9
- version = "7.5.10"
9
+ version = "7.5.12"
10
10
  authors = [{ name = "ragardner", email = "github@ragardner.simplelogin.com" }]
11
11
  requires-python = ">=3.8"
12
12
  license = {file = "LICENSE.txt"}
@@ -4,7 +4,7 @@
4
4
  tksheet - A Python tkinter table widget
5
5
  """
6
6
 
7
- __version__ = "7.5.10"
7
+ __version__ = "7.5.12"
8
8
 
9
9
  from .colors import (
10
10
  color_map,
@@ -20,6 +20,7 @@ from .constants import (
20
20
  )
21
21
  from .formatters import is_bool_like, try_to_bool
22
22
  from .functions import (
23
+ any_editor_or_dropdown_open,
23
24
  consecutive_ranges,
24
25
  event_dict,
25
26
  event_has_char_key,
@@ -49,7 +50,7 @@ from .tooltip import Tooltip
49
50
 
50
51
 
51
52
  class ColumnHeaders(tk.Canvas):
52
- def __init__(self, parent, **kwargs):
53
+ def __init__(self, parent: tk.Misc, **kwargs) -> None:
53
54
  super().__init__(
54
55
  parent,
55
56
  background=parent.ops.header_bg,
@@ -72,6 +73,7 @@ class ColumnHeaders(tk.Canvas):
72
73
  )
73
74
  self.tooltip_widgets = widget_descendants(self.tooltip)
74
75
  self.tooltip_coords, self.tooltip_after_id, self.tooltip_showing = None, None, False
76
+ self.tooltip_cell_content = ""
75
77
  recursive_bind(self.tooltip, "<Leave>", self.close_tooltip_save)
76
78
  self.current_cursor = ""
77
79
  self.popup_menu_loc = None
@@ -1268,6 +1270,7 @@ class ColumnHeaders(tk.Canvas):
1268
1270
  selections: dict,
1269
1271
  datacn: int,
1270
1272
  has_dd: bool,
1273
+ tags: str | tuple[str],
1271
1274
  ) -> tuple[str, bool]:
1272
1275
  redrawn = False
1273
1276
  kwargs = self.get_cell_kwargs(datacn, key="highlight")
@@ -1294,6 +1297,7 @@ class ColumnHeaders(tk.Canvas):
1294
1297
  + f"{int((int(high_bg[5:], 16) + int(sel_cols_bg[5:], 16)) / 2):02X}"
1295
1298
  ),
1296
1299
  outline=self.ops.header_fg if has_dd and self.ops.show_dropdown_borders else "",
1300
+ tags=tags,
1297
1301
  )
1298
1302
  elif "cells" in selections and c in selections["cells"]:
1299
1303
  txtfg = (
@@ -1314,6 +1318,7 @@ class ColumnHeaders(tk.Canvas):
1314
1318
  + f"{int((int(high_bg[5:], 16) + int(sel_cells_bg[5:], 16)) / 2):02X}"
1315
1319
  ),
1316
1320
  outline=self.ops.header_fg if has_dd and self.ops.show_dropdown_borders else "",
1321
+ tags=tags,
1317
1322
  )
1318
1323
  else:
1319
1324
  txtfg = self.ops.header_fg if kwargs[1] is None else kwargs[1]
@@ -1325,6 +1330,7 @@ class ColumnHeaders(tk.Canvas):
1325
1330
  self.current_height - 1,
1326
1331
  fill=high_bg,
1327
1332
  outline=self.ops.header_fg if has_dd and self.ops.show_dropdown_borders else "",
1333
+ tags=tags,
1328
1334
  )
1329
1335
  elif not kwargs:
1330
1336
  if "columns" in selections and c in selections["columns"]:
@@ -1336,6 +1342,7 @@ class ColumnHeaders(tk.Canvas):
1336
1342
  self.current_height - 1,
1337
1343
  fill=self.ops.header_selected_columns_bg,
1338
1344
  outline=self.ops.header_fg if has_dd and self.ops.show_dropdown_borders else "",
1345
+ tags=tags,
1339
1346
  )
1340
1347
  elif "cells" in selections and c in selections["cells"]:
1341
1348
  txtfg = self.ops.header_selected_cells_fg
@@ -1346,9 +1353,19 @@ class ColumnHeaders(tk.Canvas):
1346
1353
  self.current_height - 1,
1347
1354
  fill=self.ops.header_selected_cells_bg,
1348
1355
  outline=self.ops.header_fg if has_dd and self.ops.show_dropdown_borders else "",
1356
+ tags=tags,
1349
1357
  )
1350
1358
  else:
1351
1359
  txtfg = self.ops.header_fg
1360
+ redrawn = self.redraw_highlight(
1361
+ fc + 1,
1362
+ 0,
1363
+ sc,
1364
+ self.current_height - 1,
1365
+ fill="",
1366
+ outline=self.ops.header_fg if has_dd and self.ops.show_dropdown_borders else "",
1367
+ tags=tags,
1368
+ )
1352
1369
  return txtfg, redrawn
1353
1370
 
1354
1371
  def redraw_highlight(
@@ -1359,17 +1376,18 @@ class ColumnHeaders(tk.Canvas):
1359
1376
  y2: float,
1360
1377
  fill: str,
1361
1378
  outline: str,
1379
+ tags: str | tuple[str],
1362
1380
  ) -> bool:
1363
1381
  coords = (x1, y1, x2, y2)
1364
1382
  if self.hidd_high:
1365
1383
  iid, showing = self.hidd_high.popitem()
1366
1384
  self.coords(iid, coords)
1367
1385
  if showing:
1368
- self.itemconfig(iid, fill=fill, outline=outline)
1386
+ self.itemconfig(iid, fill=fill, outline=outline, tags=tags)
1369
1387
  else:
1370
- self.itemconfig(iid, fill=fill, outline=outline, state="normal")
1388
+ self.itemconfig(iid, fill=fill, outline=outline, state="normal", tags=tags)
1371
1389
  else:
1372
- iid = self.create_rectangle(coords, fill=fill, outline=outline)
1390
+ iid = self.create_rectangle(coords, fill=fill, outline=outline, tags=tags)
1373
1391
  self.disp_high[iid] = True
1374
1392
  return True
1375
1393
 
@@ -1402,8 +1420,8 @@ class ColumnHeaders(tk.Canvas):
1402
1420
  draw_arrow: bool = True,
1403
1421
  open_: bool = False,
1404
1422
  ) -> None:
1405
- if draw_outline and self.ops.show_dropdown_borders:
1406
- self.redraw_highlight(x1 + 1, y1 + 1, x2, y2, fill="", outline=self.ops.header_fg)
1423
+ # if draw_outline and self.ops.show_dropdown_borders:
1424
+ # self.redraw_highlight(x1 + 1, y1 + 1, x2, y2, fill="", outline=self.ops.header_fg)
1407
1425
  if draw_arrow:
1408
1426
  mod = (self.MT.header_txt_height - 1) if self.MT.header_txt_height % 2 else self.MT.header_txt_height
1409
1427
  small_mod = int(mod / 5)
@@ -1506,15 +1524,15 @@ class ColumnHeaders(tk.Canvas):
1506
1524
  self.MT.char_widths[self.header_font][c] = wd
1507
1525
  return wd
1508
1526
 
1509
- def redraw_corner(self, x: float, y: float) -> None:
1527
+ def redraw_corner(self, x: float, y: float, tags: str | tuple[str]) -> None:
1510
1528
  if self.hidd_corners:
1511
1529
  iid = self.hidd_corners.pop()
1512
1530
  self.coords(iid, x - 10, y, x, y, x, y + 10)
1513
- self.itemconfig(iid, fill=self.ops.header_grid_fg, state="normal")
1531
+ self.itemconfig(iid, fill=self.ops.header_grid_fg, state="normal", tags=tags)
1514
1532
  self.disp_corners.add(iid)
1515
1533
  else:
1516
1534
  self.disp_corners.add(
1517
- self.create_polygon(x - 10, y, x, y, x, y + 10, fill=self.ops.header_grid_fg, tags="lift")
1535
+ self.create_polygon(x - 10, y, x, y, x, y + 10, fill=self.ops.header_grid_fg, tags=tags)
1518
1536
  )
1519
1537
 
1520
1538
  def redraw_grid_and_text(
@@ -1552,7 +1570,6 @@ class ColumnHeaders(tk.Canvas):
1552
1570
  self.current_height,
1553
1571
  )
1554
1572
  top = self.canvasy(0)
1555
-
1556
1573
  if (self.ops.show_vertical_grid or self.width_resizing_enabled) and col_pos_exists:
1557
1574
  yend = self.current_height - 5
1558
1575
  points = [
@@ -1580,7 +1597,6 @@ class ColumnHeaders(tk.Canvas):
1580
1597
  )
1581
1598
  )
1582
1599
  self.redraw_gridline(points=points, fill=self.ops.header_grid_fg, width=1)
1583
-
1584
1600
  sel_cells_bg = (
1585
1601
  self.ops.header_selected_cells_bg
1586
1602
  if self.ops.header_selected_cells_bg.startswith("#")
@@ -1603,6 +1619,7 @@ class ColumnHeaders(tk.Canvas):
1603
1619
  crightgridln = self.MT.col_positions[c + 1]
1604
1620
  datacn = c if self.MT.all_columns_displayed else self.MT.displayed_columns[c]
1605
1621
  kwargs = self.get_cell_kwargs(datacn, key="dropdown")
1622
+ tag = f"{c}"
1606
1623
  fill, dd_drawn = self.redraw_highlight_get_text_fg(
1607
1624
  fc=cleftgridln,
1608
1625
  sc=crightgridln,
@@ -1612,6 +1629,7 @@ class ColumnHeaders(tk.Canvas):
1612
1629
  selections=selections,
1613
1630
  datacn=datacn,
1614
1631
  has_dd=bool(kwargs),
1632
+ tags=("h", "c", tag),
1615
1633
  )
1616
1634
  if datacn in self.cell_options and "align" in self.cell_options[datacn]:
1617
1635
  align = self.cell_options[datacn]["align"]
@@ -1675,10 +1693,9 @@ class ColumnHeaders(tk.Canvas):
1675
1693
  or (align[-1] == "n" and cleftgridln + 5 > scrollpos_right)
1676
1694
  ):
1677
1695
  continue
1678
-
1696
+ tags = ("lift", "c", tag)
1679
1697
  if note_corners and max_width > 5 and datacn in self.cell_options and "note" in self.cell_options[datacn]:
1680
- self.redraw_corner(crightgridln, 0)
1681
-
1698
+ self.redraw_corner(crightgridln, 0, tags)
1682
1699
  text = self.cell_str(datacn, fix=False)
1683
1700
  if not text:
1684
1701
  continue
@@ -1701,7 +1718,7 @@ class ColumnHeaders(tk.Canvas):
1701
1718
  fill=fill,
1702
1719
  font=font,
1703
1720
  anchor=align,
1704
- tags=("lift", "t", f"{c}"),
1721
+ tags=tags,
1705
1722
  )
1706
1723
  else:
1707
1724
  self.itemconfig(
@@ -1711,7 +1728,7 @@ class ColumnHeaders(tk.Canvas):
1711
1728
  font=font,
1712
1729
  anchor=align,
1713
1730
  state="normal",
1714
- tags=("lift", "t", f"{c}"),
1731
+ tags=tags,
1715
1732
  )
1716
1733
  else:
1717
1734
  iid = self.create_text(
@@ -1721,7 +1738,7 @@ class ColumnHeaders(tk.Canvas):
1721
1738
  fill=fill,
1722
1739
  font=font,
1723
1740
  anchor=align,
1724
- tags=("lift", "t", f"{c}"),
1741
+ tags=tags,
1725
1742
  )
1726
1743
  self.disp_text[iid] = True
1727
1744
  else:
@@ -1736,7 +1753,7 @@ class ColumnHeaders(tk.Canvas):
1736
1753
  fill=fill,
1737
1754
  font=font,
1738
1755
  anchor=align,
1739
- tags=("lift", "t", f"{c}"),
1756
+ tags=tags,
1740
1757
  )
1741
1758
  else:
1742
1759
  self.itemconfig(
@@ -1746,7 +1763,7 @@ class ColumnHeaders(tk.Canvas):
1746
1763
  font=font,
1747
1764
  anchor=align,
1748
1765
  state="normal",
1749
- tags=("lift", "t", f"{c}"),
1766
+ tags=tags,
1750
1767
  )
1751
1768
  else:
1752
1769
  iid = self.create_text(
@@ -1756,7 +1773,7 @@ class ColumnHeaders(tk.Canvas):
1756
1773
  fill=fill,
1757
1774
  font=font,
1758
1775
  anchor=align,
1759
- tags=("lift", "t", f"{c}"),
1776
+ tags=tags,
1760
1777
  )
1761
1778
  self.disp_text[iid] = True
1762
1779
  draw_y += self.MT.header_txt_height
@@ -1771,12 +1788,12 @@ class ColumnHeaders(tk.Canvas):
1771
1788
  self.tag_raise("lift")
1772
1789
  if self.disp_resize_lines:
1773
1790
  self.tag_raise("rw")
1774
- self.tag_bind("t", "<Enter>", self.enter_text)
1775
- self.tag_bind("t", "<Leave>", self.leave_text)
1791
+ self.tag_bind("c", "<Enter>", self.enter_cell)
1792
+ self.tag_bind("c", "<Leave>", self.leave_cell)
1776
1793
  return True
1777
1794
 
1778
- def enter_text(self, event: tk.Event | None = None) -> None:
1779
- if self.text_editor.open or self.dropdown.open:
1795
+ def enter_cell(self, event: tk.Event | None = None) -> None:
1796
+ if any_editor_or_dropdown_open(self.MT):
1780
1797
  return
1781
1798
  can_x, can_y = self.canvasx(event.x), self.canvasy(event.y)
1782
1799
  for i in self.find_overlapping(can_x - 1, can_y - 1, can_x + 1, can_y + 1):
@@ -1790,7 +1807,7 @@ class ColumnHeaders(tk.Canvas):
1790
1807
  except Exception:
1791
1808
  continue
1792
1809
 
1793
- def leave_text(self, event: tk.Event | None = None) -> None:
1810
+ def leave_cell(self, event: tk.Event | None = None) -> None:
1794
1811
  if self.tooltip_after_id is not None:
1795
1812
  self.after_cancel(self.tooltip_after_id)
1796
1813
  self.tooltip_after_id = None
@@ -1801,7 +1818,7 @@ class ColumnHeaders(tk.Canvas):
1801
1818
  self.tooltip_coords = None
1802
1819
 
1803
1820
  def start_tooltip_timer(self) -> None:
1804
- self.tooltip_after_id = self.after(1000, self.check_and_show_tooltip)
1821
+ self.tooltip_after_id = self.after(self.ops.tooltip_hover_delay, self.check_and_show_tooltip)
1805
1822
 
1806
1823
  def check_and_show_tooltip(self, event: tk.Event | None = None) -> None:
1807
1824
  current_x, current_y = self.winfo_pointerx(), self.winfo_pointery()
@@ -1823,19 +1840,22 @@ class ColumnHeaders(tk.Canvas):
1823
1840
  kws = self.get_cell_kwargs(datacn, key="note")
1824
1841
  if not self.ops.tooltips and not kws and not self.ops.user_can_create_notes:
1825
1842
  return
1843
+ self.MT.hide_tooltip()
1844
+ self.RI.hide_tooltip()
1826
1845
  cell_readonly = self.get_cell_kwargs(datacn, "readonly") or not self.MT.index_edit_cell_enabled()
1827
1846
  if kws:
1828
1847
  note = kws["note"]
1829
1848
  note_readonly = kws["readonly"]
1830
1849
  elif self.ops.user_can_create_notes:
1831
1850
  note = ""
1832
- note_readonly = bool(cell_readonly)
1851
+ note_readonly = False
1833
1852
  else:
1834
1853
  note = None
1835
1854
  note_readonly = True
1855
+ self.tooltip_cell_content = f"{self.get_cell_data(datacn, none_to_empty_str=True)}"
1836
1856
  self.tooltip.reset(
1837
1857
  **{
1838
- "text": f"{self.get_cell_data(datacn, none_to_empty_str=True)}",
1858
+ "text": self.tooltip_cell_content,
1839
1859
  "cell_readonly": cell_readonly,
1840
1860
  "note": note,
1841
1861
  "note_readonly": note_readonly,
@@ -1855,25 +1875,18 @@ class ColumnHeaders(tk.Canvas):
1855
1875
  def close_tooltip_save(self, event: tk.Event | None = None) -> None:
1856
1876
  widget = self.winfo_containing(self.winfo_pointerx(), self.winfo_pointery())
1857
1877
  if any(widget == tw for tw in self.tooltip_widgets):
1858
- try:
1859
- if self.tooltip.notebook.index("current") == 0:
1860
- self.tooltip.content_text.focus_set()
1861
- else:
1862
- self.tooltip.note_text.focus_set()
1863
- except Exception:
1864
- self.tooltip.content_text.focus_set()
1865
1878
  return
1866
1879
  if not self.tooltip.cell_readonly or not self.tooltip.note_readonly:
1867
1880
  _, c, cell, note = self.tooltip.get()
1868
1881
  datacn = self.MT.datacn(c)
1869
- if not self.tooltip.cell_readonly:
1882
+ if not self.tooltip.cell_readonly and cell != self.tooltip_cell_content:
1870
1883
  event_data = self.new_single_edit_event(c, datacn, "??", self.get_cell_data(datacn), cell)
1871
1884
  self.do_single_edit(c, datacn, event_data, cell)
1872
1885
  if not self.tooltip.note_readonly:
1873
1886
  span = self.PAR.span(None, datacn, None, datacn + 1).options(table=False, header=True)
1874
1887
  self.PAR.note(span, note=note if note else None, readonly=False)
1888
+ self.MT.refresh()
1875
1889
  self.hide_tooltip()
1876
- self.MT.refresh()
1877
1890
  self.focus_set()
1878
1891
 
1879
1892
  def get_redraw_selections(self, startc: int, endc: int) -> dict[str, set[int]]:
@@ -1960,6 +1973,7 @@ class ColumnHeaders(tk.Canvas):
1960
1973
  self.text_editor.set_text(self.text_editor.get() + "" if not isinstance(text, str) else text)
1961
1974
  return False
1962
1975
  self.hide_text_editor()
1976
+ self.hide_tooltip()
1963
1977
  if not self.MT.see(0, c, keep_yscroll=True):
1964
1978
  self.MT.main_table_redraw_grid_and_text(True, True)
1965
1979
  x = self.MT.col_positions[c] + 1
@@ -841,11 +841,21 @@ def remove_duplicates_outside_section(strings: list[str], section_start: int, se
841
841
 
842
842
  section_end = section_start + section_size
843
843
  section_set = set(strings[section_start:section_end])
844
- print(section_set, section_start, section_size)
845
844
 
846
845
  return [s for i, s in enumerate(strings) if (section_start <= i < section_end) or (s not in section_set)]
847
846
 
848
847
 
848
+ def any_editor_or_dropdown_open(MT) -> bool:
849
+ return (
850
+ MT.dropdown.open
851
+ or MT.RI.dropdown.open
852
+ or MT.CH.dropdown.open
853
+ or MT.text_editor.open
854
+ or MT.RI.text_editor.open
855
+ or MT.CH.text_editor.open
856
+ )
857
+
858
+
849
859
  def get_new_indexes(
850
860
  move_to: int,
851
861
  to_move: Iterable[int],