Skip to content

Commit f949836

Browse files
committed
7.5.10 -> 7.5.11
#### Changed: - Option `user_can_create_notes` now overrides cells made `readonly` but not notes created by the `note()` function that are readonly. #### Added: - Option `tooltip_hover_delay` to control how long the mouse cursor must stay still before a tooltip appears. #### Improved: - If tooltips/notes are being used hovering over any area of a cell will now make them appear rather than just the cells text. - A cell edit will now only occur when using tooltips if the tooltip editor's content changed. #### Fixed: - Tooltip wrongly opens while cell text editor is open. - Removed leftover debugging `print()` call from treeview move function.
1 parent e9022bb commit f949836

12 files changed

+223
-128
lines changed

docs/CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
### Version 7.5.11
2+
#### Changed:
3+
- Option `user_can_create_notes` now overrides cells made `readonly` but not notes created by the `note()` function that are readonly.
4+
5+
#### Added:
6+
- Option `tooltip_hover_delay` to control how long the mouse cursor must stay still before a tooltip appears.
7+
8+
#### Improved:
9+
- If tooltips/notes are being used hovering over any area of a cell will now make them appear rather than just the cells text.
10+
- A cell edit will now only occur when using tooltips if the tooltip editor's content changed.
11+
12+
#### Fixed:
13+
- Tooltip wrongly opens while cell text editor is open.
14+
- Removed leftover debugging `print()` call from treeview move function.
15+
116
### Version 7.5.10
217
#### Fixed:
318
- Error with notes when using readonly cells and writable notes. [#301](https://github.com/ragardner/tksheet/issues/301).

docs/DOCUMENTATION.html

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1045,6 +1045,7 @@ <h1 id="initialization-options"><strong>Initialization Options</strong></h1>
10451045
note_corners: bool = False,
10461046
tooltip_width: int = 210,
10471047
tooltip_height: int = 210,
1048+
tooltip_hover_delay: int = 1200,
10481049
# colors
10491050
outline_thickness: int = 0,
10501051
theme: str = &quot;light blue&quot;,
@@ -1744,6 +1745,7 @@ <h1 id="sheet-options"><strong>Sheet Options</strong></h1>
17441745
&quot;note_corners&quot;: False,
17451746
&quot;tooltip_width&quot;: int = 210,
17461747
&quot;tooltip_height&quot;: int = 210,
1748+
&quot;tooltip_hover_delay&quot;: int = 1200,
17471749
</code></pre>
17481750
<p>Notes:</p>
17491751
<ul>
@@ -4572,7 +4574,7 @@ <h4 id="replace-all-using-mapping"><strong>Replace all using mapping</strong></h
45724574
</ul>
45734575
<hr />
45744576
<h1 id="notes-and-tooltips"><strong>Notes and tooltips</strong></h1>
4575-
<p>When using either notes or tooltips a popup can be made to appear for associated cells when the mouse cursor <strong>remains still over a cell's text</strong> for 1sec.</p>
4577+
<p>When using either notes or tooltips a popup can be made to appear for associated cells when the mouse cursor remains still over a cell.</p>
45764578
<p>Tooltips and notes are two different things but both produce the same popup, if using both cell notes and tooltips then the popup with have clickable tabs.</p>
45774579
<h2 id="cell-tooltips"><strong>Cell tooltips</strong></h2>
45784580
<p>Cell tooltips show the cell's value, they are:</p>
@@ -4581,11 +4583,18 @@ <h2 id="cell-tooltips"><strong>Cell tooltips</strong></h2>
45814583
<li>A global setting and not for individual cells like <code>note</code>s are.</li>
45824584
<li>Editable if the cell itself is editable - if the cell is readonly then the <code>Cell</code> tooltip should be also.</li>
45834585
<li>Saved when the mouse leaves the tooltip popup.</li>
4586+
</ul>
4587+
<p>You can:</p>
4588+
<ul>
45844589
<li>Change the width and height of tooltip &amp; note popups using the settings:<ul>
45854590
<li><code>set_options(tooltip_width=my_width)</code> (<code>int</code>).</li>
45864591
<li><code>set_options(tooltip_height=my_height)</code> (<code>int</code>).</li>
45874592
</ul>
45884593
</li>
4594+
<li>Change the time required for the mouse cursor to stay still before a tooltip appears:<ul>
4595+
<li><code>set_options(tooltip_hover_delay=my_delay_in_ms)</code> (<code>int</code>).</li>
4596+
</ul>
4597+
</li>
45894598
</ul>
45904599
<p>Activate &amp; deactivate tooltips either at your <code>Sheet</code>s initialization:</p>
45914600
<pre><code class="language-python">sheet = Sheet(parent, tooltips=True)
@@ -4619,7 +4628,7 @@ <h2 id="cell-notes"><strong>Cell notes</strong></h2>
46194628
<li>Use <code>readonly</code> <code>False</code> to allow the user to edit the existing notes.</li>
46204629
<li><code>readonly</code> is <code>True</code> by default.</li>
46214630
</ul>
4622-
<p>You can also allow the user to create new notes and delete notes using the setting <code>user_can_create_notes</code> e.g. <code>sheet.set_options(user_can_create_notes=True)</code>.</p>
4631+
<p>You can also allow the user to create new notes and delete notes using the setting <code>user_can_create_notes</code> e.g. <code>sheet.set_options(user_can_create_notes=True)</code>. This allows the user to create and modify notes. This also allows note editing even in cells that have been made <code>readonly</code> in the non-note sense.</p>
46234632
<p>If an existing note was created using the <code>note()</code> function or <code>Span.note()</code> function and <code>readonly</code> was set to <code>True</code> then the user will not be able to edit or delete that note even if <code>user_can_create_notes</code> is <code>True</code>.</p>
46244633
<p>Examples:</p>
46254634
<p><strong>Note for header cell in column <code>A</code>/<code>0</code>:</strong></p>

docs/DOCUMENTATION.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,7 @@ def __init__(
360360
note_corners: bool = False,
361361
tooltip_width: int = 210,
362362
tooltip_height: int = 210,
363+
tooltip_hover_delay: int = 1200,
363364
# colors
364365
outline_thickness: int = 0,
365366
theme: str = "light blue",
@@ -1084,6 +1085,7 @@ else ["<Home>"],
10841085
"note_corners": False,
10851086
"tooltip_width": int = 210,
10861087
"tooltip_height": int = 210,
1088+
"tooltip_hover_delay": int = 1200,
10871089
```
10881090

10891091
Notes:
@@ -4212,7 +4214,7 @@ Notes:
42124214
---
42134215
# **Notes and tooltips**
42144216

4215-
When using either notes or tooltips a popup can be made to appear for associated cells when the mouse cursor **remains still over a cell's text** for 1sec.
4217+
When using either notes or tooltips a popup can be made to appear for associated cells when the mouse cursor remains still over a cell.
42164218

42174219
Tooltips and notes are two different things but both produce the same popup, if using both cell notes and tooltips then the popup with have clickable tabs.
42184220

@@ -4224,9 +4226,14 @@ Cell tooltips show the cell's value, they are:
42244226
- A global setting and not for individual cells like `note`s are.
42254227
- Editable if the cell itself is editable - if the cell is readonly then the `Cell` tooltip should be also.
42264228
- Saved when the mouse leaves the tooltip popup.
4229+
4230+
You can:
4231+
42274232
- Change the width and height of tooltip & note popups using the settings:
42284233
- `set_options(tooltip_width=my_width)` (`int`).
42294234
- `set_options(tooltip_height=my_height)` (`int`).
4235+
- Change the time required for the mouse cursor to stay still before a tooltip appears:
4236+
- `set_options(tooltip_hover_delay=my_delay_in_ms)` (`int`).
42304237

42314238
Activate & deactivate tooltips either at your `Sheet`s initialization:
42324239

@@ -4271,7 +4278,7 @@ note(*key: CreateSpanTypes, note: str | None = None, readonly: bool = True) -> S
42714278
- Use `readonly` `False` to allow the user to edit the existing notes.
42724279
- `readonly` is `True` by default.
42734280

4274-
You can also allow the user to create new notes and delete notes using the setting `user_can_create_notes` e.g. `sheet.set_options(user_can_create_notes=True)`.
4281+
You can also allow the user to create new notes and delete notes using the setting `user_can_create_notes` e.g. `sheet.set_options(user_can_create_notes=True)`. This allows the user to create and modify notes. This also allows note editing even in cells that have been made `readonly` in the non-note sense.
42754282

42764283
If an existing note was created using the `note()` function or `Span.note()` function and `readonly` was set to `True` then the user will not be able to edit or delete that note even if `user_can_create_notes` is `True`.
42774284

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
66
name = "tksheet"
77
description = "Tkinter table / sheet and treeview widget"
88
readme = "README.md"
9-
version = "7.5.10"
9+
version = "7.5.11"
1010
authors = [{ name = "ragardner", email = "[email protected]" }]
1111
requires-python = ">=3.8"
1212
license = {file = "LICENSE.txt"}

tksheet/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
tksheet - A Python tkinter table widget
55
"""
66

7-
__version__ = "7.5.10"
7+
__version__ = "7.5.11"
88

99
from .colors import (
1010
color_map,

0 commit comments

Comments
 (0)