Learn R Programming

traitr (version 0.14)

trueFalseItem: Item for Boolean values

Description

Item for Boolean values

Usage

trueFalseItem(value = TRUE, name, label = name, help = "", tooltip = "", attr, model, editor, ...)

Arguments

value
Default value for the model
name
Required name for object. Names should be unique within a group of items
label
Optional label, default value is the name
help
Optional help string
tooltip
Optional tooltip to display
attr
A list of attributes to pass to widget on construction. Eg. attr=list(size=c(100,200))
model
Optional model. Useful if one wishes to use same model for multiple views
editor
Specification of editor (a view) to override default
...
Passed to parent proto object during call to proto. The value editor_style="compact" will pass this information to the editor causing it to render as a checkbox.

Value

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

See Also

Item

Examples

Run this code
## basic usage
a <- trueFalseItem(TRUE, name="x")
a$get_x()
a$set_x(FALSE)
a$get_x()

Run the code above in your browser using DataLab