For Programmers: Free Programming Magazines  


Home > Archive > Tcl > September 2005 > accessing tree nodes









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author accessing tree nodes
anil.pundoor@gmail.com

2005-09-29, 7:01 pm

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.

Torsten Reincke

2005-09-29, 7:01 pm


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

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com