[R] gWidgets - gtable returning multiple values

michaelyb cel81009759 at gmail.com
Fri Jun 15 01:01:21 CEST 2012


To whoever is looking for the same thing as I was, I found a solution, or
sort of.
Here is the code:

flavors<-c("vanilla", "chocolate", "strawberry") 

w <- gwindow("checkbox example") 
gp <- ggroup(container=w) 
glabel("Favorite flavors:",cont=gp) 
cbg <- gtable(flavors, cont=gp, multiple=T) 

# Here is the trick
 addHandlerClicked(cbg,handler=function(h,...){
My_Flav<-svalue(cbg)
 print(My_Flav)
})

Select multiple lines, and you shall see all the selected rows.

--
View this message in context: http://r.789695.n4.nabble.com/gWidgets-gtable-returning-multiple-values-tp4633296p4633450.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list