View source: R/widget-treeview.R
| tree_view | R Documentation |
Shows a tree_node() hierarchy with expand/collapse arrows and guide
lines. Only visible lines are painted, and children can be loaded lazily.
tree_view(
root,
show_root = TRUE,
guides = TRUE,
id = NULL,
classes = NULL,
style = NULL
)
root |
The root |
show_root |
Show the root itself (otherwise its children are the top level and it is always expanded). |
guides |
Draw guide lines? |
id |
Optional identifier. |
classes |
Optional classes. |
style |
A |
Keys: Up/Down/Page Up/Page Down/Home/End move; Right expands (or goes to
the first child); Left collapses (or goes to the parent); Space toggles;
Enter toggles and sends "tree.node_activated". Clicking selects a node;
clicking its arrow toggles it.
Messages (event$data: node, label, data, id):
"tree.node_selected", "tree.node_expanded", "tree.node_collapsed",
"tree.node_activated".
A TreeView widget with method select(node) and fields
root, cursor_node, visible_count.
root <- tree_node("Project", tree_node("R", "app.R", "widget.R", expanded = TRUE),
"README.md", expanded = TRUE)
render_widget(tree_view(root), 24, 5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.