tksheet 7.2.0__py3-none-any.whl → 7.2.2__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 +273 -212
- tksheet/main_table.py +87 -71
- tksheet/row_index.py +247 -200
- tksheet/sheet.py +97 -48
- tksheet/top_left_rectangle.py +7 -2
- {tksheet-7.2.0.dist-info → tksheet-7.2.2.dist-info}/METADATA +6 -4
- tksheet-7.2.2.dist-info/RECORD +20 -0
- tksheet-7.2.0.dist-info/RECORD +0 -20
- {tksheet-7.2.0.dist-info → tksheet-7.2.2.dist-info}/LICENSE.txt +0 -0
- {tksheet-7.2.0.dist-info → tksheet-7.2.2.dist-info}/WHEEL +0 -0
- {tksheet-7.2.0.dist-info → tksheet-7.2.2.dist-info}/top_level.txt +0 -0
tksheet/sheet.py
CHANGED
@@ -4,7 +4,7 @@ import tkinter as tk
|
|
4
4
|
from bisect import bisect_left
|
5
5
|
from collections import defaultdict, deque
|
6
6
|
from collections.abc import Callable, Generator, Iterator, Sequence
|
7
|
-
from itertools import accumulate, chain, islice, product
|
7
|
+
from itertools import accumulate, chain, islice, product, repeat
|
8
8
|
from timeit import default_timer
|
9
9
|
from tkinter import ttk
|
10
10
|
from typing import Literal
|
@@ -21,7 +21,6 @@ from .functions import (
|
|
21
21
|
dropdown_search_function,
|
22
22
|
event_dict,
|
23
23
|
fix_format_kwargs,
|
24
|
-
new_tk_event,
|
25
24
|
force_bool,
|
26
25
|
get_checkbox_dict,
|
27
26
|
get_checkbox_kwargs,
|
@@ -30,6 +29,7 @@ from .functions import (
|
|
30
29
|
idx_param_to_int,
|
31
30
|
is_iterable,
|
32
31
|
key_to_span,
|
32
|
+
new_tk_event,
|
33
33
|
num2alpha,
|
34
34
|
pickled_event_dict,
|
35
35
|
pop_positions,
|
@@ -592,7 +592,7 @@ class Sheet(tk.Frame):
|
|
592
592
|
self.MT.enable_bindings(bindings)
|
593
593
|
return self
|
594
594
|
|
595
|
-
def disable_bindings(self, *bindings) -> Sheet:
|
595
|
+
def disable_bindings(self, *bindings: str) -> Sheet:
|
596
596
|
self.MT.disable_bindings(bindings)
|
597
597
|
return self
|
598
598
|
|
@@ -1081,8 +1081,11 @@ class Sheet(tk.Frame):
|
|
1081
1081
|
Includes child widgets such as scroll bars
|
1082
1082
|
Returns bool
|
1083
1083
|
"""
|
1084
|
-
|
1085
|
-
|
1084
|
+
try:
|
1085
|
+
widget = self.focus_get()
|
1086
|
+
return widget == self or any(widget == c for c in self.children.values())
|
1087
|
+
except Exception:
|
1088
|
+
return False
|
1086
1089
|
|
1087
1090
|
def focus_set(
|
1088
1091
|
self,
|
@@ -1289,8 +1292,6 @@ class Sheet(tk.Frame):
|
|
1289
1292
|
self,
|
1290
1293
|
*key: CreateSpanTypes,
|
1291
1294
|
) -> object:
|
1292
|
-
span = self.span_from_key(*key)
|
1293
|
-
rows, cols = self.ranges_from_span(span)
|
1294
1295
|
"""
|
1295
1296
|
e.g. retrieves entire table as pandas dataframe
|
1296
1297
|
sheet["A1"].expand().options(pandas.DataFrame).data
|
@@ -1350,6 +1351,8 @@ class Sheet(tk.Frame):
|
|
1350
1351
|
convert(data) - sends the data to an optional convert function
|
1351
1352
|
|
1352
1353
|
"""
|
1354
|
+
span = self.span_from_key(*key)
|
1355
|
+
rows, cols = self.ranges_from_span(span)
|
1353
1356
|
tdisp, idisp, hdisp = span.tdisp, span.idisp, span.hdisp
|
1354
1357
|
table, index, header = span.table, span.index, span.header
|
1355
1358
|
fmt_kw = span.kwargs if span.type_ == "format" and span.kwargs else None
|
@@ -1546,16 +1549,12 @@ class Sheet(tk.Frame):
|
|
1546
1549
|
emit_event: bool | None = None,
|
1547
1550
|
redraw: bool = True,
|
1548
1551
|
) -> EventDataDict:
|
1549
|
-
span = self.span_from_key(*key)
|
1550
|
-
if data is None:
|
1551
|
-
data = []
|
1552
1552
|
"""
|
1553
1553
|
e.g.
|
1554
1554
|
df = pandas.DataFrame([[1, 2, 3], [4, 5, 6]])
|
1555
1555
|
sheet["A1"] = df.values.tolist()
|
1556
1556
|
|
1557
|
-
|
1558
|
-
just uses the from_r, from_c values
|
1557
|
+
just uses the spans from_r, from_c values
|
1559
1558
|
|
1560
1559
|
'data' parameter could be:
|
1561
1560
|
- list of lists
|
@@ -1599,6 +1598,9 @@ class Sheet(tk.Frame):
|
|
1599
1598
|
- h stands for header
|
1600
1599
|
|
1601
1600
|
"""
|
1601
|
+
span = self.span_from_key(*key)
|
1602
|
+
if data is None:
|
1603
|
+
data = []
|
1602
1604
|
startr, startc = span_froms(span)
|
1603
1605
|
table, index, header = span.table, span.index, span.header
|
1604
1606
|
fmt_kw = span.kwargs if span.type_ == "format" and span.kwargs else None
|
@@ -2266,16 +2268,14 @@ class Sheet(tk.Frame):
|
|
2266
2268
|
mod_positions: bool = True,
|
2267
2269
|
mod_data: bool = True,
|
2268
2270
|
) -> int | Sheet:
|
2271
|
+
total_rows = self.MT.total_data_rows()
|
2269
2272
|
if number is None:
|
2270
|
-
return
|
2273
|
+
return total_rows
|
2271
2274
|
if not isinstance(number, int) or number < 0:
|
2272
2275
|
raise ValueError("number argument must be integer and > 0")
|
2273
|
-
if number >
|
2274
|
-
|
2275
|
-
|
2276
|
-
for r in range(number - len(self.MT.data)):
|
2277
|
-
self.MT.insert_row_position("end", height)
|
2278
|
-
elif number < len(self.MT.data):
|
2276
|
+
if number > total_rows and mod_positions:
|
2277
|
+
self.MT.insert_row_positions(heights=number - total_rows)
|
2278
|
+
elif number < total_rows:
|
2279
2279
|
if not self.MT.all_rows_displayed:
|
2280
2280
|
self.MT.display_rows(enable=False, reset_row_positions=False, deselect_all=True)
|
2281
2281
|
self.MT.row_positions[number + 1 :] = []
|
@@ -2294,11 +2294,8 @@ class Sheet(tk.Frame):
|
|
2294
2294
|
return total_cols
|
2295
2295
|
if not isinstance(number, int) or number < 0:
|
2296
2296
|
raise ValueError("number argument must be integer and > 0")
|
2297
|
-
if number > total_cols:
|
2298
|
-
|
2299
|
-
width = self.ops.default_column_width
|
2300
|
-
for c in range(number - total_cols):
|
2301
|
-
self.MT.insert_col_position("end", width)
|
2297
|
+
if number > total_cols and mod_positions:
|
2298
|
+
self.MT.insert_col_positions(widths=number - total_cols)
|
2302
2299
|
elif number < total_cols:
|
2303
2300
|
if not self.MT.all_columns_displayed:
|
2304
2301
|
self.MT.display_columns(enable=False, reset_col_positions=False, deselect_all=True)
|
@@ -3137,6 +3134,7 @@ class Sheet(tk.Frame):
|
|
3137
3134
|
row if isinstance(row, int) else int(row),
|
3138
3135
|
redraw=False,
|
3139
3136
|
run_binding_func=run_binding_func,
|
3137
|
+
ext=True,
|
3140
3138
|
)
|
3141
3139
|
return self.set_refresh_timer(redraw)
|
3142
3140
|
|
@@ -3145,6 +3143,7 @@ class Sheet(tk.Frame):
|
|
3145
3143
|
column if isinstance(column, int) else int(column),
|
3146
3144
|
redraw=False,
|
3147
3145
|
run_binding_func=run_binding_func,
|
3146
|
+
ext=True,
|
3148
3147
|
)
|
3149
3148
|
return self.set_refresh_timer(redraw)
|
3150
3149
|
|
@@ -3154,6 +3153,7 @@ class Sheet(tk.Frame):
|
|
3154
3153
|
column if isinstance(column, int) else int(column),
|
3155
3154
|
redraw=False,
|
3156
3155
|
run_binding_func=run_binding_func,
|
3156
|
+
ext=True,
|
3157
3157
|
)
|
3158
3158
|
return self.set_refresh_timer(redraw)
|
3159
3159
|
|
@@ -3175,6 +3175,7 @@ class Sheet(tk.Frame):
|
|
3175
3175
|
redraw=False,
|
3176
3176
|
run_binding_func=run_binding_func,
|
3177
3177
|
set_as_current=set_as_current,
|
3178
|
+
ext=True,
|
3178
3179
|
)
|
3179
3180
|
return self.set_refresh_timer(redraw)
|
3180
3181
|
|
@@ -3190,6 +3191,7 @@ class Sheet(tk.Frame):
|
|
3190
3191
|
redraw=False,
|
3191
3192
|
run_binding_func=run_binding_func,
|
3192
3193
|
set_as_current=set_as_current,
|
3194
|
+
ext=True,
|
3193
3195
|
)
|
3194
3196
|
return self.set_refresh_timer(redraw)
|
3195
3197
|
|
@@ -3205,6 +3207,7 @@ class Sheet(tk.Frame):
|
|
3205
3207
|
redraw=False,
|
3206
3208
|
run_binding_func=run_binding_func,
|
3207
3209
|
set_as_current=set_as_current,
|
3210
|
+
ext=True,
|
3208
3211
|
)
|
3209
3212
|
return self.set_refresh_timer(redraw)
|
3210
3213
|
|
@@ -3224,6 +3227,7 @@ class Sheet(tk.Frame):
|
|
3224
3227
|
redraw=False,
|
3225
3228
|
run_binding_func=run_binding_func,
|
3226
3229
|
set_as_current=set_as_current,
|
3230
|
+
ext=True,
|
3227
3231
|
)
|
3228
3232
|
return self.set_refresh_timer(redraw)
|
3229
3233
|
|
@@ -3241,6 +3245,7 @@ class Sheet(tk.Frame):
|
|
3241
3245
|
redraw=False,
|
3242
3246
|
run_binding_func=run_binding_func,
|
3243
3247
|
set_as_current=set_as_current,
|
3248
|
+
ext=True,
|
3244
3249
|
)
|
3245
3250
|
return self.set_refresh_timer(redraw)
|
3246
3251
|
|
@@ -3258,6 +3263,7 @@ class Sheet(tk.Frame):
|
|
3258
3263
|
redraw=False,
|
3259
3264
|
run_binding_func=run_binding_func,
|
3260
3265
|
set_as_current=set_as_current,
|
3266
|
+
ext=True,
|
3261
3267
|
)
|
3262
3268
|
return self.set_refresh_timer(redraw)
|
3263
3269
|
|
@@ -3269,7 +3275,14 @@ class Sheet(tk.Frame):
|
|
3269
3275
|
c2: int,
|
3270
3276
|
type_: Literal["cells", "rows", "columns", "cols"] = "cells",
|
3271
3277
|
) -> int:
|
3272
|
-
return self.MT.create_selection_box(
|
3278
|
+
return self.MT.create_selection_box(
|
3279
|
+
r1=r1,
|
3280
|
+
c1=c1,
|
3281
|
+
r2=r2,
|
3282
|
+
c2=c2,
|
3283
|
+
type_="columns" if type_ == "cols" else type_,
|
3284
|
+
ext=True,
|
3285
|
+
)
|
3273
3286
|
|
3274
3287
|
def recreate_all_selection_boxes(self) -> Sheet:
|
3275
3288
|
self.MT.recreate_all_selection_boxes()
|
@@ -3318,7 +3331,7 @@ class Sheet(tk.Frame):
|
|
3318
3331
|
only_set_if_too_small: bool = False,
|
3319
3332
|
redraw: bool = True,
|
3320
3333
|
) -> Sheet:
|
3321
|
-
self.MT.set_cell_size_to_text(r=row, c=column,
|
3334
|
+
self.MT.set_cell_size_to_text(r=row, c=column, only_if_too_small=only_set_if_too_small)
|
3322
3335
|
return self.set_refresh_timer(redraw)
|
3323
3336
|
|
3324
3337
|
def set_all_cell_sizes_to_text(
|
@@ -3340,7 +3353,7 @@ class Sheet(tk.Frame):
|
|
3340
3353
|
) -> Sheet:
|
3341
3354
|
self.CH.set_width_of_all_cols(
|
3342
3355
|
width=width,
|
3343
|
-
|
3356
|
+
only_if_too_small=only_set_if_too_small,
|
3344
3357
|
recreate=recreate_selection_boxes,
|
3345
3358
|
)
|
3346
3359
|
return self.set_refresh_timer(redraw)
|
@@ -3354,7 +3367,7 @@ class Sheet(tk.Frame):
|
|
3354
3367
|
) -> Sheet:
|
3355
3368
|
self.RI.set_height_of_all_rows(
|
3356
3369
|
height=height,
|
3357
|
-
|
3370
|
+
only_if_too_small=only_set_if_too_small,
|
3358
3371
|
recreate=recreate_selection_boxes,
|
3359
3372
|
)
|
3360
3373
|
return self.set_refresh_timer(redraw)
|
@@ -3369,13 +3382,12 @@ class Sheet(tk.Frame):
|
|
3369
3382
|
if column == "all" and width == "default":
|
3370
3383
|
self.MT.reset_col_positions()
|
3371
3384
|
elif column == "displayed" and width == "text":
|
3372
|
-
|
3373
|
-
for c in range(sc, ec - 1):
|
3385
|
+
for c in range(*self.MT.visible_text_columns):
|
3374
3386
|
self.CH.set_col_width(c)
|
3375
3387
|
elif width == "text" and isinstance(column, int):
|
3376
|
-
self.CH.set_col_width(col=column, width=None,
|
3388
|
+
self.CH.set_col_width(col=column, width=None, only_if_too_small=only_set_if_too_small)
|
3377
3389
|
elif isinstance(width, int) and isinstance(column, int):
|
3378
|
-
self.CH.set_col_width(col=column, width=width,
|
3390
|
+
self.CH.set_col_width(col=column, width=width, only_if_too_small=only_set_if_too_small)
|
3379
3391
|
elif isinstance(column, int):
|
3380
3392
|
return int(self.MT.col_positions[column + 1] - self.MT.col_positions[column])
|
3381
3393
|
return self.set_refresh_timer(redraw)
|
@@ -3390,13 +3402,12 @@ class Sheet(tk.Frame):
|
|
3390
3402
|
if row == "all" and height == "default":
|
3391
3403
|
self.MT.reset_row_positions()
|
3392
3404
|
elif row == "displayed" and height == "text":
|
3393
|
-
|
3394
|
-
for r in range(sr, er - 1):
|
3405
|
+
for r in range(*self.MT.visible_text_rows):
|
3395
3406
|
self.RI.set_row_height(r)
|
3396
3407
|
elif height == "text" and isinstance(row, int):
|
3397
|
-
self.RI.set_row_height(row=row, height=None,
|
3408
|
+
self.RI.set_row_height(row=row, height=None, only_if_too_small=only_set_if_too_small)
|
3398
3409
|
elif isinstance(height, int) and isinstance(row, int):
|
3399
|
-
self.RI.set_row_height(row=row, height=height,
|
3410
|
+
self.RI.set_row_height(row=row, height=height, only_if_too_small=only_set_if_too_small)
|
3400
3411
|
elif isinstance(row, int):
|
3401
3412
|
return int(self.MT.row_positions[row + 1] - self.MT.row_positions[row])
|
3402
3413
|
return self.set_refresh_timer(redraw)
|
@@ -3411,9 +3422,33 @@ class Sheet(tk.Frame):
|
|
3411
3422
|
return self.MT.row_positions
|
3412
3423
|
return self.MT.get_row_heights()
|
3413
3424
|
|
3425
|
+
def get_row_text_height(
|
3426
|
+
self,
|
3427
|
+
row: int,
|
3428
|
+
visible_only: bool = False,
|
3429
|
+
only_if_too_small: bool = False,
|
3430
|
+
) -> int:
|
3431
|
+
return self.RI.get_row_text_height(
|
3432
|
+
row=row,
|
3433
|
+
visible_only=visible_only,
|
3434
|
+
only_if_too_small=only_if_too_small,
|
3435
|
+
)
|
3436
|
+
|
3437
|
+
def get_column_text_width(
|
3438
|
+
self,
|
3439
|
+
column: int,
|
3440
|
+
visible_only: bool = False,
|
3441
|
+
only_if_too_small: bool = False,
|
3442
|
+
) -> int:
|
3443
|
+
return self.CH.get_col_text_width(
|
3444
|
+
col=column,
|
3445
|
+
visible_only=visible_only,
|
3446
|
+
only_if_too_small=only_if_too_small,
|
3447
|
+
)
|
3448
|
+
|
3414
3449
|
def set_column_widths(
|
3415
3450
|
self,
|
3416
|
-
column_widths: Iterator[
|
3451
|
+
column_widths: Iterator[float] | None = None,
|
3417
3452
|
canvas_positions: bool = False,
|
3418
3453
|
reset: bool = False,
|
3419
3454
|
) -> Sheet:
|
@@ -3423,12 +3458,12 @@ class Sheet(tk.Frame):
|
|
3423
3458
|
if canvas_positions and isinstance(column_widths, list):
|
3424
3459
|
self.MT.col_positions = column_widths
|
3425
3460
|
else:
|
3426
|
-
self.MT.col_positions = list(accumulate(chain([0],
|
3461
|
+
self.MT.col_positions = list(accumulate(chain([0], column_widths)))
|
3427
3462
|
return self
|
3428
3463
|
|
3429
3464
|
def set_row_heights(
|
3430
3465
|
self,
|
3431
|
-
row_heights: Iterator[
|
3466
|
+
row_heights: Iterator[float] | None = None,
|
3432
3467
|
canvas_positions: bool = False,
|
3433
3468
|
reset: bool = False,
|
3434
3469
|
) -> Sheet:
|
@@ -3438,7 +3473,7 @@ class Sheet(tk.Frame):
|
|
3438
3473
|
if canvas_positions and isinstance(row_heights, list):
|
3439
3474
|
self.MT.row_positions = row_heights
|
3440
3475
|
else:
|
3441
|
-
self.MT.row_positions = list(accumulate(chain([0],
|
3476
|
+
self.MT.row_positions = list(accumulate(chain([0], row_heights)))
|
3442
3477
|
return self
|
3443
3478
|
|
3444
3479
|
def set_width_of_index_to_text(self, text: None | str = None, *args, **kwargs) -> Sheet:
|
@@ -3540,10 +3575,10 @@ class Sheet(tk.Frame):
|
|
3540
3575
|
return len(self.MT.row_positions) - 1, len(self.MT.col_positions) - 1
|
3541
3576
|
if isinstance(total_rows, int):
|
3542
3577
|
height = self.MT.get_default_row_height()
|
3543
|
-
self.MT.row_positions = list(accumulate(chain([0], (height
|
3578
|
+
self.MT.row_positions = list(accumulate(chain([0], repeat(height, total_rows))))
|
3544
3579
|
if isinstance(total_columns, int):
|
3545
3580
|
width = self.ops.default_column_width
|
3546
|
-
self.MT.col_positions = list(accumulate(chain([0], (width
|
3581
|
+
self.MT.col_positions = list(accumulate(chain([0], repeat(width, total_columns))))
|
3547
3582
|
return self
|
3548
3583
|
|
3549
3584
|
def move_row_position(self, row: int, moveto: int) -> Sheet:
|
@@ -3557,14 +3592,14 @@ class Sheet(tk.Frame):
|
|
3557
3592
|
def get_example_canvas_column_widths(self, total_cols: int | None = None) -> list[float]:
|
3558
3593
|
colpos = int(self.ops.default_column_width)
|
3559
3594
|
if isinstance(total_cols, int):
|
3560
|
-
return list(accumulate(chain([0], (colpos
|
3561
|
-
return list(accumulate(chain([0], (colpos
|
3595
|
+
return list(accumulate(chain([0], repeat(colpos, total_cols))))
|
3596
|
+
return list(accumulate(chain([0], repeat(colpos, len(self.MT.col_positions) - 1))))
|
3562
3597
|
|
3563
3598
|
def get_example_canvas_row_heights(self, total_rows: int | None = None) -> list[float]:
|
3564
3599
|
rowpos = self.MT.get_default_row_height()
|
3565
3600
|
if isinstance(total_rows, int):
|
3566
|
-
return list(accumulate(chain([0], (rowpos
|
3567
|
-
return list(accumulate(chain([0], (rowpos
|
3601
|
+
return list(accumulate(chain([0], repeat(rowpos, total_rows))))
|
3602
|
+
return list(accumulate(chain([0], repeat(rowpos, len(self.MT.row_positions) - 1))))
|
3568
3603
|
|
3569
3604
|
def verify_row_heights(self, row_heights: list[float], canvas_positions: bool = False) -> bool:
|
3570
3605
|
if not isinstance(row_heights, list):
|
@@ -3574,7 +3609,7 @@ class Sheet(tk.Frame):
|
|
3574
3609
|
return False
|
3575
3610
|
return not any(
|
3576
3611
|
x - z < self.MT.min_row_height or not isinstance(x, int) or isinstance(x, bool)
|
3577
|
-
for z, x in zip(
|
3612
|
+
for z, x in zip(row_heights, islice(row_heights, 1, None))
|
3578
3613
|
)
|
3579
3614
|
return not any(z < self.MT.min_row_height or not isinstance(z, int) or isinstance(z, bool) for z in row_heights)
|
3580
3615
|
|
@@ -3586,7 +3621,7 @@ class Sheet(tk.Frame):
|
|
3586
3621
|
return False
|
3587
3622
|
return not any(
|
3588
3623
|
x - z < self.MT.min_column_width or not isinstance(x, int) or isinstance(x, bool)
|
3589
|
-
for z, x in zip(
|
3624
|
+
for z, x in zip(column_widths, islice(column_widths, 1, None))
|
3590
3625
|
)
|
3591
3626
|
return not any(
|
3592
3627
|
z < self.MT.min_column_width or not isinstance(z, int) or isinstance(z, bool) for z in column_widths
|
@@ -3606,6 +3641,20 @@ class Sheet(tk.Frame):
|
|
3606
3641
|
return self.MT.max_column_width
|
3607
3642
|
return width
|
3608
3643
|
|
3644
|
+
@property
|
3645
|
+
def visible_rows(self) -> tuple[int, int]:
|
3646
|
+
"""
|
3647
|
+
returns: tuple[visible start row int, visible end row int]
|
3648
|
+
"""
|
3649
|
+
return self.MT.visible_text_rows
|
3650
|
+
|
3651
|
+
@property
|
3652
|
+
def visible_columns(self) -> tuple[int, int]:
|
3653
|
+
"""
|
3654
|
+
returns: tuple[visible start column int, visible end column int]
|
3655
|
+
"""
|
3656
|
+
return self.MT.visible_text_columns
|
3657
|
+
|
3609
3658
|
# Identifying Bound Event Mouse Position
|
3610
3659
|
|
3611
3660
|
def identify_region(self, event: object) -> Literal["table", "index", "header", "top left"]:
|
tksheet/top_left_rectangle.py
CHANGED
@@ -140,7 +140,7 @@ class TopLeftRectangle(tk.Canvas):
|
|
140
140
|
fill=self.PAR.ops.top_left_fg,
|
141
141
|
)
|
142
142
|
|
143
|
-
def basic_bindings(self, enable=True) -> None:
|
143
|
+
def basic_bindings(self, enable: bool = True) -> None:
|
144
144
|
if enable:
|
145
145
|
self.bind("<Motion>", self.mouse_motion)
|
146
146
|
self.bind("<ButtonPress-1>", self.b1_press)
|
@@ -156,7 +156,12 @@ class TopLeftRectangle(tk.Canvas):
|
|
156
156
|
self.unbind("<Double-Button-1>")
|
157
157
|
self.unbind(rc_binding)
|
158
158
|
|
159
|
-
def set_dimensions(
|
159
|
+
def set_dimensions(
|
160
|
+
self,
|
161
|
+
new_w: None | int = None,
|
162
|
+
new_h: None | int = None,
|
163
|
+
recreate_selection_boxes: bool = True,
|
164
|
+
) -> None:
|
160
165
|
try:
|
161
166
|
if new_h is None:
|
162
167
|
h = self.winfo_height()
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: tksheet
|
3
|
-
Version: 7.2.
|
3
|
+
Version: 7.2.2
|
4
4
|
Summary: Tkinter table / sheet widget
|
5
5
|
Author-email: ragardner <github@ragardner.simplelogin.com>
|
6
6
|
License: Copyright (c) 2019 ragardner and open source contributors
|
@@ -40,14 +40,16 @@ Requires-Python: >=3.8
|
|
40
40
|
Description-Content-Type: text/markdown
|
41
41
|
License-File: LICENSE.txt
|
42
42
|
|
43
|
-
|
43
|
+
<p align="center" width="100%">
|
44
|
+
<img width="33%" src="https://github.com/ragardner/tksheet/assets/26602401/4124c3ce-cf62-4925-9158-c5bdf712765b">
|
45
|
+
</p>
|
46
|
+
|
47
|
+
# <div align="center">tksheet - python tkinter table widget</div>
|
44
48
|
|
45
49
|
[](https://pypi.python.org/pypi/tksheet/)  [](https://github.com/ragardner/tksheet/blob/master/LICENSE.txt)
|
46
50
|
|
47
51
|
[](https://github.com/ragardner/tksheet/releases) [](https://pypi.org/project/tksheet/)
|
48
52
|
|
49
|
-
### **A python tkinter table widget**
|
50
|
-
|
51
53
|
| **Help** | |
|
52
54
|
|-------------------|------------------------------------------------------------------|
|
53
55
|
| Versions 6.x.x -> | [Documentation Wiki](https://github.com/ragardner/tksheet/wiki/Version-6) | |
|
@@ -0,0 +1,20 @@
|
|
1
|
+
tksheet/__init__.py,sha256=AAZRsDaJpm-EpbRjLLHkml18_RHCTN55YebntHKqRRM,2124
|
2
|
+
tksheet/colors.py,sha256=1k06VorynLmnC4FdJg8H4reIA6rXaeXBpdMwXLhN8oc,51594
|
3
|
+
tksheet/column_headers.py,sha256=zArcBsPeob8xUvM0cYB4RjwcKMfLLkHiz7oUtDFBAeg,102039
|
4
|
+
tksheet/formatters.py,sha256=DXif00aq9DgFpXwkbiqD86KxtDg0Meop51hLY-KcGNQ,10037
|
5
|
+
tksheet/functions.py,sha256=rNfDpQRoXZm_Ro-tlF92ox3fi37p71Mio1PGTreM_oc,40835
|
6
|
+
tksheet/main_table.py,sha256=hHO4tuzEBlugZ2k0eOgCcmWXiqEovx7VYIE1KgH4Q0I,324868
|
7
|
+
tksheet/other_classes.py,sha256=P3FYUYreLhstATvHCNow8sDQoCsD_02KB6oXcca3ahE,13628
|
8
|
+
tksheet/row_index.py,sha256=aBNZIKMBnbIHdCSsmKdLgZSQ8ESDyAXwFxlSRVR1RO8,108213
|
9
|
+
tksheet/sheet.py,sha256=rDRy2yg07lpPelfx4zrGQUJXKb7evB9tqzKJupCPXzI,268309
|
10
|
+
tksheet/sheet_options.py,sha256=Azo7_-H0e0ssYEoU7Mq_OWy3S-U05rp4_6Q2E2Ffuu8,12262
|
11
|
+
tksheet/text_editor.py,sha256=aRm1Y5GfORiEAJthtN1uQ30CT3VoF8mRWvR-SIXPrJU,6548
|
12
|
+
tksheet/themes.py,sha256=N9nAj6vcWk4UdcrAakvz2LPbJEJWXdv3j7Om6AnvX5k,14474
|
13
|
+
tksheet/top_left_rectangle.py,sha256=o-M6i5NjaJwo60tV-BDP9SbaT1CzQNoPjuoC7p-nb5Q,8436
|
14
|
+
tksheet/types.py,sha256=IgoEHMbceKpakcZtanxKaKJ4RdCq7UW6EoEIIz5O59k,340
|
15
|
+
tksheet/vars.py,sha256=86ubZZElsnQuC6Lv6bW2lt2NhD9wAp6PxtkK7ufKqq0,3452
|
16
|
+
tksheet-7.2.2.dist-info/LICENSE.txt,sha256=ndbcCPe9SlHfweE_W2RAueWUe2k7yudyxYLq6WjFdn4,1101
|
17
|
+
tksheet-7.2.2.dist-info/METADATA,sha256=Y0l-rRw47WpKgl3zI2bU5r4AnSSjYpDwX4k404lwvFo,6319
|
18
|
+
tksheet-7.2.2.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
19
|
+
tksheet-7.2.2.dist-info/top_level.txt,sha256=my61PXCcck_HHAc9cq3NAlyAr3A3FXxCy9gptEOaCN8,8
|
20
|
+
tksheet-7.2.2.dist-info/RECORD,,
|
tksheet-7.2.0.dist-info/RECORD
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
tksheet/__init__.py,sha256=jR-gUFH2UpZZlKYfVUGzgX_4osEFu3sH2J-1Q4mYA6E,2124
|
2
|
-
tksheet/colors.py,sha256=1k06VorynLmnC4FdJg8H4reIA6rXaeXBpdMwXLhN8oc,51594
|
3
|
-
tksheet/column_headers.py,sha256=aP--2TcyftLPKnqxQwQfCK_Efg9QGP8Gg8zHM4FGmLI,100805
|
4
|
-
tksheet/formatters.py,sha256=DXif00aq9DgFpXwkbiqD86KxtDg0Meop51hLY-KcGNQ,10037
|
5
|
-
tksheet/functions.py,sha256=rNfDpQRoXZm_Ro-tlF92ox3fi37p71Mio1PGTreM_oc,40835
|
6
|
-
tksheet/main_table.py,sha256=HMINDxzyc_7xaRc8hejf0LVN95KDrINWpmZ2grDOjdQ,323910
|
7
|
-
tksheet/other_classes.py,sha256=P3FYUYreLhstATvHCNow8sDQoCsD_02KB6oXcca3ahE,13628
|
8
|
-
tksheet/row_index.py,sha256=QJZBENeN2obsWlm450TS_M0SUOh7hyi6-wjtgzLcZeU,107199
|
9
|
-
tksheet/sheet.py,sha256=xudDBo9PLvbhIEFzaz9pCHBbGEJQb3QNbKgLlR-VwTk,267442
|
10
|
-
tksheet/sheet_options.py,sha256=Azo7_-H0e0ssYEoU7Mq_OWy3S-U05rp4_6Q2E2Ffuu8,12262
|
11
|
-
tksheet/text_editor.py,sha256=aRm1Y5GfORiEAJthtN1uQ30CT3VoF8mRWvR-SIXPrJU,6548
|
12
|
-
tksheet/themes.py,sha256=N9nAj6vcWk4UdcrAakvz2LPbJEJWXdv3j7Om6AnvX5k,14474
|
13
|
-
tksheet/top_left_rectangle.py,sha256=JDByauKiEBPoJfLWcZsU26XTqMLVtrGsI0wFLT9Yv2w,8356
|
14
|
-
tksheet/types.py,sha256=IgoEHMbceKpakcZtanxKaKJ4RdCq7UW6EoEIIz5O59k,340
|
15
|
-
tksheet/vars.py,sha256=86ubZZElsnQuC6Lv6bW2lt2NhD9wAp6PxtkK7ufKqq0,3452
|
16
|
-
tksheet-7.2.0.dist-info/LICENSE.txt,sha256=ndbcCPe9SlHfweE_W2RAueWUe2k7yudyxYLq6WjFdn4,1101
|
17
|
-
tksheet-7.2.0.dist-info/METADATA,sha256=3PeqoGQH1IAF7xlL9JUFlnGDWanV3qGSdSnx-O99TU0,6145
|
18
|
-
tksheet-7.2.0.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
19
|
-
tksheet-7.2.0.dist-info/top_level.txt,sha256=my61PXCcck_HHAc9cq3NAlyAr3A3FXxCy9gptEOaCN8,8
|
20
|
-
tksheet-7.2.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|