Indra B. Kshattry wrote: > > I am trying to use R-Tcl/TK in my R-code. I want to develop a dialog > box for Data Entry. I am trying to make use of > > Keyword "entry" in your examples, but I could not make it. Could you > kindly give me a hint to write the code > Do you mean something like this? I am a newbie with R's tcltk too.
library(tcltk) tt <- tktoplevel() input.widget <- tkentry(tt) output.widget <- tkentry(tt) tkinsert(input.widget, "end", "4") tkinsert(output.widget, "end", "24") gui.fat <- function() { n <- as.integer(tclvalue(tkget(input.widget))) fat.n <- prod(1:n) tkdelete(output.widget, 0, "end") tkinsert(output.widget, "end", fat.n) } button.widget <- tkbutton(tt, text="fat() =", command = gui.fat) tkpack(input.widget, button.widget, output.widget) # geometry manager Alberto Monteiro _______________________________________________ R-SIG-GUI mailing list R-SIG-GUI@stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-gui