toggling a group of icons in gWidgets
问题 Adapting an example I can toggle the display of an icon like this: reject <- "D:/Pictures/web/close32.png" accept <- "D:/Pictures/web/open32.png" w= gwindow() g1 <- ggroup(horizontal=TRUE, cont=w) icon <- gimage(reject,cont=g1) state <- FALSE # a global changeState <- function(h,...) { if(state) { svalue(icon) <- reject } else { svalue(icon) <- accept } state <<- !state } addHandlerClicked(icon, handler=changeState) However, I would like to get this to work with a group of icons example 3x3