gformlayout: A form layout container

Description Usage Arguments Examples

View source: R/gformlayout.R

Description

A simple way to layout forms with labels. The label is passed to the label argument of the control's constructor which is then passed along to the add method of the parent container.

Usage

1
2
3
gformlayout(align = c("default", "left", "center", "right", "top"),
  spacing = 5, container = NULL, ..., label.width = 100, width = NULL,
  height = NULL, ext.args = NULL)

Arguments

align

alignment of labels, from c("default", "left", "center", "right", "top").

spacing

spacing between columns

container

parent container

...

passed to add method of parent container.

label.width

width reserved for labels

width

width in pixels of component. Sizing in gWidgetsWWW2 is sometimes necessary as the arguments expand and fill are not well implemented.

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 asJSObject.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Not run: 
w <- gwindow("gformlayout")
g <- gvbox(container=w)

flyt <- gformlayout(container=g)
gedit("", label="Name:", container=flyt)
gedit("", label="Rank:", container=flyt)
gedit("", label="Serial No.:", container=flyt)

b <- gbutton("Show me", container=g, handler=function(h,...) {
print(svalue(flyt))
})


## End(Not run)

jverzani/gWidgetsWWW2 documentation built on May 18, 2017, 2 p.m.