Constructor for grid layout container
The grid layout container uses matrix notation to position its
child components. This allows one to align widgets both
horizontally and vertically, as desired. There is some support for
matrix methods, such as dim
and [
to reference the
child objects.
generic for toolkit dispatch
The [
method for the grid layout allows one to reference
the child objects by index. The return value is non standard. It
may be the item, a list (if one dimensonaL) or an array. The list
format is convenient to refer to all the child objects in a
column.
The matrix notation allows for spanning of multiple rows and or columns, but no holes.
The ...
argument is used to pass in values for expand, fill, anchor (see
the add
method of ggroup
) for their meaning).
glayout(homogeneous = FALSE, spacing = 10, container = NULL, ..., toolkit = guiToolkit()) .glayout(toolkit, homogeneous = FALSE, spacing = 10, container = NULL, ...) ## S3 method for class 'GLayout' x[i, j, ..., drop = TRUE] ## S3 replacement method for class 'GLayout' x[i ,j, ...] <- value
homogeneous |
are cells all the same size |
spacing |
between cell spacing |
container |
A parent container. When a widget is created it can be incorporated into the widget heirarchy by passing in a parent container at construction time. (For some toolkits this is not optional, e.g. gWidgets2tcltk or gWidgets2WWW2.) |
... |
These values are passed to the |
toolkit |
Each widget constructor is passed in the toolkit it
will use. This is typically done using the default, which will
lookup the toolkit through |
x |
object |
i |
row index |
j |
column index |
drop |
drop return type? |
value |
constructor for a widget using this object as the parent container |
gformlayout
for a more convenient means to layout forms.
## Not run: w <- gwindow("glayout example", visible=FALSE) g <- gvbox(container=w) lyt <- glayout(container=g) lyt[1,1] <- "a label" lyt[1,2] <- gedit("A widget", container=lyt) lyt[2, 1:2] <- gcombobox(state.name, cont=lyt) g1 <- ggroup(container=g) addSpring(g1) gbutton("values", container=g1, handler=function(h, ...) { print(sapply(lyt[,2], svalue)) }) visible(w) <- TRUE ## End(Not run)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.