Re: query ttk::treeview for all nodes?
- From: Aric Bills <aric.bills@xxxxxxxxx>
- Date: Wed, 30 Apr 2008 10:06:59 -0700 (PDT)
On Apr 30, 6:05 am, Clint <ckhan...@xxxxxxxxx> wrote:
Using Tcl 8.5.2 and tile 0.8.2:
I am trying to find the best way to query the tree for the all current
nodes in the tree so that I can easily delete everything in the tree.
I have played with keeping a list or an array around when I build the
tree to use that, but gets a little challenging when adding or
deleting a node or two from a large tree.
I have used the Bwidget tree in the past and could get all nodes (and
delete) by a command like:
-> $tree delete [ $tree nodes root ]
The Tile equivalent is:
$treeview delete [$treeview children {}]
My guess is that the treeview builds nodes that are a sibling to the
root node and not a child?
No, they are descendants of the root node, which is {}.
Hope that helps,
Aric
.
- Follow-Ups:
- Re: query ttk::treeview for all nodes?
- From: Clint
- Re: query ttk::treeview for all nodes?
- References:
- query ttk::treeview for all nodes?
- From: Clint
- query ttk::treeview for all nodes?
- Prev by Date: Re: Package Require getting "wrong version"
- Next by Date: Re: query ttk::treeview for all nodes?
- Previous by thread: query ttk::treeview for all nodes?
- Next by thread: Re: query ttk::treeview for all nodes?
- Index(es):
Relevant Pages
|