Description Usage Arguments Value Note Examples
A basic radio button group. Specify the labels through items. The main value is the label or index.
1 2 3 |
items |
Vector of items to choose one from. |
selected |
index of initially selected item |
horizontal |
logical. Horizontal or vertical layout. (See also columns) |
handler |
optional means (to |
action |
Passed to handler to parameterize a call |
container |
A parent container. In gWidgetsWWW2 a
parent container is not optional (though it can be substituted
with the |
... |
Used to pass along argument to the parent container's
|
width |
width in pixels of component. Sizing in
gWidgetsWWW2 is sometimes necessary as the arguments
|
height |
height in pixels of the component. |
ext.args |
The contructors of gWidgetsWWW2 ultimately
call an Ext constructor. The options passed to the Ext constructor
may be added to or overridden by use of this argument. Values are
passed in as named list components and with values converted into JavaScript
objects by |
columns |
Can be used to override horizontal TRUE or FALSE |
a GRadio
reference class object
the [<-
method (to change the labels) is not implemented.
1 2 3 4 5 6 7 8 9 | w <- gwindow()
sb <- gstatusbar("Powered by gWidgetsWWW and Rook", cont=w)
rb <- gradio(state.name[1:4], cont=w)
addHandlerChanged(rb, handler=function(h,...) {
galert(paste("You clicked", svalue(h$obj)), parent=w)
})
svalue(rb, index=TRUE) <- 1 # by index
svalue(rb) <- state.name[2] # by value
## rb[] <- state.name[1:6] ## doesn't work!
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.