glayout {gWidgets} | R Documentation |
A container for laying out widgets in a table. The widgets are added
using matrix notation ([i,j]<-
).
glayout(homogeneous = FALSE, spacing = 10, container = NULL, ..., toolkit = guiToolkit())
homogeneous |
A logical indicating if the cells are all the same size |
spacing |
Spacing in pixels between cells |
container |
Optional container to attach widget to. |
... |
ignored |
toolkit |
Which GUI toolkit to use |
Widgets are added using matrix notation. A widget can span
several cells, for instance obj[1:2,2:3] <- widget
would place the widget in the first and second rows and second
and third columns.
For RGtk, the widget may only be realized once, and once realized can
not be modified. As such the process to add a new table is: use
glayout
contstructor to make object. Add widgets with matrix
notation. Call visible<-
method on object to make widget
visible.
## Not run: ## show part of mtcars dataframe in a layout obj = glayout(container=TRUE) for(i in 1:6) { for (j in 1:4) obj[i,j] <- glabel(mtcars[i,j]) } visible(obj) <- TRUE ## End(Not run)