[R] tree widget question

Peter Dalgaard p.dalgaard at biostat.ku.dk
Thu Oct 27 23:47:09 CEST 2005


tom wright <tom at maladmin.com> writes:

> I'm trying to create an app using TclTk and R
> Can someone please explain how I bind a click event to the tree widget
> (http://bioinf.wehi.edu.au/~wettenhall/RTclTkExamples/TreeWidget.html)
> Ideally I'd like to bind to particular elements in the tree but tkbind
> doesnt seem to work.

You need to study the docs for the Tree widget in the BWidget package,
e.g. via http://tcllib.sourceforge.net/BWman/Tree.html. 

I think that you can do something like

tcl(mytree, "bindText", "<Button-1>",
                         function(node)print(node)) 

(As multiple hints in the wording should tell you, this is completely
untested) 
-- 
   O__  ---- Peter Dalgaard             Øster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark          Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)                  FAX: (+45) 35327907




More information about the R-help mailing list