Re: query ttk::treeview for all nodes?
- From: Clint <ckhannah@xxxxxxxxx>
- Date: Wed, 30 Apr 2008 10:28:12 -0700 (PDT)
On Apr 30, 1:06 pm, Aric Bills <aric.bi...@xxxxxxxxx> wrote:
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
Ah, that is it. I kept wanting to use the id of 'root' instead of
{}. Thanks!
.
- References:
- query ttk::treeview for all nodes?
- From: Clint
- Re: query ttk::treeview for all nodes?
- From: Aric Bills
- query ttk::treeview for all nodes?
- Prev by Date: Re: query ttk::treeview for all nodes?
- Next by Date: Re: Removing an accelerator from a menu
- Previous by thread: Re: query ttk::treeview for all nodes?
- Next by thread: Package Require getting "wrong version"
- Index(es):
Relevant Pages
|