Description Usage Arguments Value Examples
Group, or box, container
Shortcut for vertical box containers.
1 2 3 4 |
horizontal |
left or right (default), or top to bottom ( |
spacing |
Margin around each child component in pixels. Can
be a single number, in which case it is equal pixel space around
each child. But for gWidgetsWWW2 one can specify a vector with
recycling like function(top, right=top, bottom=top, left=right). A
typical pattern is c(5,5,0,0), as otherwise there are 10 = 5 + 5 pixels
between adjoing children. To get padding just around interior of
box, pass in a value through ext.args, as in
|
use.scrollwindow |
logical. If given, scrollbars will appear |
container |
A parent container. In gWidgetsWWW2 a
parent container is not optional (though it can be substituted
with the |
... |
passed to |
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 |
a GGroup
reference class object
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | w <- gwindow()
sb <- gstatusbar("Powered by gWidgetsWWW and Rook", cont=w)
g <- ggroup(cont=w, horizontal=FALSE) ## top to bottom
for(i in 1:10) gbutton(i, cont=g)
## add/delete
ctr <- 1 ### for label
addRow <- function(g) {
g1 <- ggroup(cont=g)
gbutton("x", cont=g1, handler=function(h,...) {delete(g, g1)})
glabel(paste("Click x to delete", ctr), cont=g1)
ctr <<- ctr + 1
}
g1 <- gframe("add/delete", cont=g, horizontal=FALSE)
addRow(g1)
f <- gframe("Adding and deleting", cont=g, horizontal=FALSE)
gbutton("+", cont=f, handler=function(h,...) addRow(f))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.