Learn R Programming

traitr (version 0.14)

aContainer: A container to give a different context than the default for a set of items

Description

A container to give a different context than the default for a set of items

Usage

aContainer(..., context = NULL, attr = list(), enabled_when, visible_when)

Arguments

context
ItemGroup or item to get context from. Typically just NULL.
attr
gWidget values passed to constructor
enabled_when
Method to determine when items in container should be enabled
visible_when
Method to determine when items in container should be visible
...
children items specified by character strings

Value

Returns a proto object. Call obj$show_help() to view its methods and properties.

See Also

Container

Examples

Run this code
i <- aDialog(items=list(x=numericItem(1), y=stringItem("a")))
lay <- aContainer("x","y")
## Not run: i$make_gui(gui_layout=lay)
## how to do enabled when
lay <- aContainer("x",
         aContainer("y", enabled_when=function(.) .$get_x() > 1))
j <- i$instance()
## Not run: j$make_gui(gui_layout=lay)
## visible can be used to hide values if not needed
i <- aDialog(items=list(x=numericItem(1), y=stringItem("a")))
lay <- aContainer("x","y")
## Not run: i$make_gui(gui_layout=lay)
## how to do enabled when
lay <- aContainer("x",
         aContainer("y", visible_when=function(.) .$get_x() > 1))
k <- i$instance()
## Not run: k$make_gui(gui_layout=lay)

Run the code above in your browser using DataLab