Re: accessing tree nodes
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.tcl archive

Re: accessing tree nodes

From: Torsten Reincke <reincke@typoscriptics.de>
Date: Thu Sep 29 2005 - 15:37:56 CEST

anil.pundoor@gmail.com 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
Received on Thu Sep 29 16:11:57 2005