Description Usage Arguments Value Examples
A button responds to mouse clicks by calling its handler
1 2 |
text |
button text |
handler |
optional means (to |
action |
passed to callback as |
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 |
a GButton
instance
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | w <- gwindow("test")
sb <- gstatusbar("Powered by gWidgetsWWW and Rook", cont=w)
g <- ggroup(cont=w, horizontal=FALSE)
b <- gbutton("click me", cont=g, handler=function(h,...) {
galert("hello world", parent=w)
})
## has an icon
b <- gbutton("up", cont=g)
## just an icon using ext override to remove text but leave icon
b <- gbutton("help", cont=g); b$call_Ext("setText")
## an action
a <- gaction("help", parent=w, handler=function(h,...) {
galert("action", parent=w)
})
b <- gbutton(action=a, cont=g)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.