Learn R Programming

traitr (version 0.3)

anItemGroup: Constructor for ItemGroup instances...

Description

Constructor for ItemGroup instances

Usage

anItemGroup(items=list(), name, ...)

Arguments

items
List of Item instances or ItemGroup instances
name
Name of ItemGroup.
...
Passed to ItemGroup proto trait

Value

  • A proto object. Call obj$show_help() to view its methods and properties.

Details

An ItemGroup creates a model with properties given by the items and a default layout for its items. This can also be specified when the layout is drawn through make_gui.

See Also

aContainer for specifying a layout

Examples

Run this code
## make a simple item group, show in non-default layout
i <- anItemGroup(items=list(
numericItem(0,"x"),
numericItem(0,"y"),
stringItem("","z")
))
lay <- aContainer("x","y", aFrame("z", label="z in a box"))
## some proto methods:
i$make_gui(cont=gwindow("Example of itemGroup"), gui_layout=lay)
i$get_x()     # get x value
i$set_x(10)   # set x value to 10
i$to_R()      # get list of x,y,z values

Run the code above in your browser using DataLab