inst/tests/ex-gcheckboxgroup.R

w <- gwindow("test gcheckboxgroup", visible=FALSE)
items <- letters[1:4]
cbg <- gcheckboxgroup(items, checked= items=="a", cont=w, horizontal=TRUE)

## svalue
print(svalue(cbg))
svalue(cbg) <- c(T,F,T,T)
print(svalue(cbg))


## [
print(cbg[])
cbg[] <- letters[12:15]                 # same length

## handler
addHandlerChanged(cbg, handler=function(h,...) {
  print(svalue(h$obj))
})


visible(w) <- TRUE

Try the gWidgets package in your browser

Any scripts or data that you put into this service are public.

gWidgets documentation built on April 29, 2020, 9:37 a.m.