tksheet 7.2.14__tar.gz → 7.2.15__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.
- {tksheet-7.2.14/tksheet.egg-info → tksheet-7.2.15}/PKG-INFO +1 -1
- {tksheet-7.2.14 → tksheet-7.2.15}/pyproject.toml +1 -1
- {tksheet-7.2.14 → tksheet-7.2.15}/tksheet/__init__.py +1 -1
- {tksheet-7.2.14 → tksheet-7.2.15}/tksheet/sheet.py +1 -0
- {tksheet-7.2.14 → tksheet-7.2.15}/tksheet/sheet_options.py +1 -1
- {tksheet-7.2.14 → tksheet-7.2.15}/tksheet/text_editor.py +15 -0
- {tksheet-7.2.14 → tksheet-7.2.15/tksheet.egg-info}/PKG-INFO +1 -1
- {tksheet-7.2.14 → tksheet-7.2.15}/LICENSE.txt +0 -0
- {tksheet-7.2.14 → tksheet-7.2.15}/README.md +0 -0
- {tksheet-7.2.14 → tksheet-7.2.15}/setup.cfg +0 -0
- {tksheet-7.2.14 → tksheet-7.2.15}/tksheet/colors.py +0 -0
- {tksheet-7.2.14 → tksheet-7.2.15}/tksheet/column_headers.py +0 -0
- {tksheet-7.2.14 → tksheet-7.2.15}/tksheet/formatters.py +0 -0
- {tksheet-7.2.14 → tksheet-7.2.15}/tksheet/functions.py +0 -0
- {tksheet-7.2.14 → tksheet-7.2.15}/tksheet/main_table.py +0 -0
- {tksheet-7.2.14 → tksheet-7.2.15}/tksheet/other_classes.py +0 -0
- {tksheet-7.2.14 → tksheet-7.2.15}/tksheet/row_index.py +0 -0
- {tksheet-7.2.14 → tksheet-7.2.15}/tksheet/themes.py +0 -0
- {tksheet-7.2.14 → tksheet-7.2.15}/tksheet/top_left_rectangle.py +0 -0
- {tksheet-7.2.14 → tksheet-7.2.15}/tksheet/types.py +0 -0
- {tksheet-7.2.14 → tksheet-7.2.15}/tksheet/vars.py +0 -0
- {tksheet-7.2.14 → tksheet-7.2.15}/tksheet.egg-info/SOURCES.txt +0 -0
- {tksheet-7.2.14 → tksheet-7.2.15}/tksheet.egg-info/dependency_links.txt +0 -0
- {tksheet-7.2.14 → tksheet-7.2.15}/tksheet.egg-info/top_level.txt +0 -0
@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
|
|
6
6
|
name = "tksheet"
|
7
7
|
description = "Tkinter table / sheet widget"
|
8
8
|
readme = "README.md"
|
9
|
-
version = "7.2.
|
9
|
+
version = "7.2.15"
|
10
10
|
authors = [{ name = "ragardner", email = "github@ragardner.simplelogin.com" }]
|
11
11
|
requires-python = ">=3.8"
|
12
12
|
license = {file = "LICENSE.txt"}
|
@@ -190,6 +190,7 @@ class Sheet(tk.Frame):
|
|
190
190
|
show_selected_cells_border: bool = True,
|
191
191
|
edit_cell_tab: Literal["right", "down", ""] = "right",
|
192
192
|
edit_cell_return: Literal["right", "down", ""] = "down",
|
193
|
+
editor_del_key: Literal["forward", "backward", ""] = "forward",
|
193
194
|
treeview: bool = False,
|
194
195
|
treeview_indent: str | int = "6",
|
195
196
|
rounded_boxes: bool = True,
|
@@ -98,7 +98,6 @@ def new_sheet_options() -> DotDict:
|
|
98
98
|
],
|
99
99
|
"delete_bindings": [
|
100
100
|
"<Delete>",
|
101
|
-
"<Delete>",
|
102
101
|
],
|
103
102
|
"select_all_bindings": [
|
104
103
|
f"<{ctrl_key}-a>",
|
@@ -241,6 +240,7 @@ def new_sheet_options() -> DotDict:
|
|
241
240
|
"show_selected_cells_border": True,
|
242
241
|
"edit_cell_tab": "right",
|
243
242
|
"edit_cell_return": "down",
|
243
|
+
"editor_del_key": "forward",
|
244
244
|
"treeview": False,
|
245
245
|
"treeview_indent": "6",
|
246
246
|
"rounded_boxes": True,
|
@@ -40,6 +40,7 @@ class TextEditorTkText(tk.Text):
|
|
40
40
|
self.bind(rc_binding, self.rc)
|
41
41
|
self.bind(f"<{ctrl_key}-a>", self.select_all)
|
42
42
|
self.bind(f"<{ctrl_key}-A>", self.select_all)
|
43
|
+
self.bind("<Delete>", self.delete_key)
|
43
44
|
self._orig = self._w + "_orig"
|
44
45
|
self.tk.call("rename", self._w, self._orig)
|
45
46
|
self.tk.createcommand(self._w, self._proxy)
|
@@ -62,6 +63,7 @@ class TextEditorTkText(tk.Text):
|
|
62
63
|
insertbackground=fg,
|
63
64
|
state=state,
|
64
65
|
)
|
66
|
+
self.editor_del_key = sheet_ops.editor_del_key
|
65
67
|
self.align = align
|
66
68
|
self.rc_popup_menu.delete(0, "end")
|
67
69
|
self.rc_popup_menu.add_command(
|
@@ -126,6 +128,19 @@ class TextEditorTkText(tk.Text):
|
|
126
128
|
self.focus_set()
|
127
129
|
self.rc_popup_menu.tk_popup(event.x_root, event.y_root)
|
128
130
|
|
131
|
+
def delete_key(self, event: object = None) -> None:
|
132
|
+
if self.editor_del_key == "forward":
|
133
|
+
return
|
134
|
+
elif not self.editor_del_key:
|
135
|
+
return "break"
|
136
|
+
elif self.editor_del_key == "backward":
|
137
|
+
if self.tag_ranges("sel"):
|
138
|
+
return
|
139
|
+
if self.index("insert") == "1.0":
|
140
|
+
return "break"
|
141
|
+
self.delete("insert-1c")
|
142
|
+
return "break"
|
143
|
+
|
129
144
|
def select_all(self, event: object = None) -> Literal["break"]:
|
130
145
|
self.tag_add(tk.SEL, "1.0", tk.END)
|
131
146
|
self.mark_set(tk.INSERT, tk.END)
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|