dlg_list.tcltkGUI | R Documentation |
A Tcl/Tk version of the {svDialogs} list selection dialog box
## S3 method for class 'tcltkGUI'
dlg_list(
choices,
preselect = NULL,
multiple = FALSE,
title = NULL,
...,
gui = .GUI
)
choices |
The list of items. It is coerced to character strings. |
preselect |
A list of preselections, or |
multiple |
Is it a multiple selection dialog box? |
title |
The title of the dialog box, or |
... |
Not used yet. |
gui |
The 'gui' object concerned by this dialog box. |
A character vector with the items that were selected by the user.
svDialogs::dlg_list()
library(svDialogstcltk) # Tcl/Tk dialog boxes are now used by default
## Not run:
# Select one or several months
res <- dlg_list(month.name, multiple = TRUE)$res
if (!length(res)) {
cat("You cancelled the choice\n")
} else {
cat("You selected:\n")
print(res)
}
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.