[R] tcltk_example

Peter Dalgaard BSA p.dalgaard at biostat.ku.dk
Thu Aug 10 00:33:10 CEST 2000


"Jason Fisher" <stormplot at hotmail.com> writes:

> Hello R and tcltk users...
> 
> I'm running into difficulties applying the tkmenubutton() and
> tklistbox() functions, found in the tcltk package, to a simple gui.
> My search for R code which utilizes these two functions has come up
> empty. Currently, I am attempting to translate pure "Tcl/Tk" code to
> R with little to no success. So far, the most helpful tool for
> learning the tcltk R commands has been the "tkdensity()" and
> "tkttest()" examples, included in the tcltk package. Any other
> (simple) examples of gui construction utilizing the tkmenubutton()
> or tklistbox() functions would be greatly appreciated.

Well, not a whole lot has been written besides the demos, but have you
studied the examples in the man pages? Also try looking at the widget
demo that comes with tcltk, and make use of the tclhelp interface if
you have it.

I haven't played too much with menus and menubuttons, but listboxes
are fairly straightforward, along the lines of

tt<-tktoplevel()
mb<-tklistbox(tt)
tkpack(mb)
tkinsert(mb, 0, month.name)
tkget(mb,"active")

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list