Feature Request: Add "deselect_path" to TreeView widget
See original GitHub issueCurrently, TreeView
widget has a select_path()
method but no public API to de-select, except to clear the whole tree. I propose a new method named deselect_path()
. In Qt, it is simply the opposite of select_path()
, as follows:
class TreeView(...):
def select_path(self, path):
item = self._path_to_item(path)
item.setSelected(True)
def deselect_path(self, path):
item = self._path_to_item(path)
item.setSelected(False)
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Feature request: tree view in open editors · Issue #81544
I would like to add that this would be an amazing tool to stay organized while working on VS Code. One of the...
Read more >TkDocs Tutorial - Treeview
A treeview widget displays a hierarchy of items and allows users to browse through it. One or more attributes of each item can...
Read more >Tkinter TreeView Widget - AskPython
The TreeView widget is very useful if you want to display a hierarchy of items, ... You can dynamically add or remove nodes...
Read more >Python Tkinter GUI Tutorial #117 - YouTube
In this video we'll learn more about the Tkinter Treeview. I'll show you how to add items, remove individually selected items, remove all ......
Read more >45. ttk.Treeview
Treeview widget is to present a hierarchical structure so that the user can use ... This means each call to the .insert() method...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think between the two that you show, I’d prefer reusing
select_path
. The reason is that it makes the code simpler in cases where you want to calculate selections–you don’t end up having to write conditional branches or use first-class functions to choose a different method. Instead it just changes thestate
kwarg, which seems more readable to me.Yes. I have many rows selected but then I want to only de-select one of them. I use this feature in
MosaicAuto
plugin instginga
.