João Gonçalves
Mon, 28 Jun 2010 03:33:28 -0700
Thank you for taking interest in this problem.Both solutions proposed worked out very smoothly. I'm certainly going to use the gWidgets package more often in my future R projects.
Best regards, João Gonçalves jverzani wrote:
João G.<joaofgo<at> gmail.com> writes:Thank you! That worked out nicely. I leave here the code used in case it turns out useful for someone else: If you wanted to do this with gWidgetstcltk you could do this: library(gWidgets) options(guiToolkit="tcltk") d<- mtcars ## some data frame w<- gwindow() g<- ggroup(cont=w, horizontal=FALSE) namesCb<- gcombobox(names(d),selected=1, cont=g) valsCb<- gcombobox(c(""), cont=g) updateCb<- function(varname) { valsCb[]<- d[[varname]] svalue(valsCb, index=TRUE)<- 1 } addHandlerChanged(namesCb, function(h,...) updateCb(svalue(h$obj))) updateCb(svalue(namesCb)) --John
_______________________________________________ R-SIG-GUI mailing list R-SIG-GUI@stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-gui