[+] row_index == -1

This commit is contained in:
SantaSpeen committed 2025-03-26 18:01:29 +03:00
1 parent 4c79770293
commit d0df8cce2d
1 file changed
+3
+3
View File
@@ -166,6 +166,9 @@ class CTkTableFrame(ctk.CTkFrame):
def edit(self, row_index, new_data=None, color=None, disable=False, **__): def edit(self, row_index, new_data=None, color=None, disable=False, **__):
"""Редактирует строку по индексу.""" """Редактирует строку по индексу."""
if row_index == -1:
row_index = len(self._data) - 1
def _disable_colors(widget): def _disable_colors(widget):
widget.unbind("<Enter>") widget.unbind("<Enter>")
widget.unbind("<Leave>") widget.unbind("<Leave>")