Re: accessing tree nodes




anil.pundoor@xxxxxxxxx wrote:
> hi
> I am using a Bwidget tree. can any one tell me how to get the text
> displayed on each node when corresponding node is clicked.

You need to specify the "-selectcommand" for the BWidget tree likr for
example:

Tree .t -selectcommand ShowItem

The path to the tree and the node name will be automatically appended
to the command. So your command could look like this:

proc ShowItem {tree node} {
set nodeText [$tree itemcget $node -text]
}

I hope, that helps!

Torsten

.



Relevant Pages

  • Re: Tree Widget
    ... I've used the BWidget tree. ... I've recently looked into the TkTreeCtrl package ... >> I am trying to develop a tree type widget into my existing app. ...
    (comp.lang.tcl)
  • Re: BWidget Tree delete
    ... I want to insert about 1000 nodes to the tree. ... After creating the BWIdget tree and inserting the 1000 nodes VmRSS = ... The BWidget tree isn't the most efficient, ...
    (comp.lang.tcl)
  • BWidget Tree delete
    ... Linux (Fedora) ... I want to insert about 1000 nodes to the tree. ... After creating the BWIdget tree and inserting the 1000 nodes VmRSS = ...
    (comp.lang.tcl)
  • Re: Bwidget Tree: Indexing nodes / delete cmd questions
    ... Though the real answer is to fix the bug in the BWidget tree (most ... BWidgets have been space-safe for a while now), ... The best way to do this though is to use the #auto substitution of node ...
    (comp.lang.tcl)
  • subprocess call acts differently than command line call?
    ... are unix-style line endings on every file in that tree that is a text ... Both the command line "file" and the python libmagic binding give the ... with CRLF line ...
    (comp.lang.python)