powered by
tklist.modal generates a dialog box that prompts the user to select from a list of options. This script uses TclTk tools that should be operable on different operating systems.
tklist.modal
tklist.modal(title, elements0, returnValOnCancel="ID_CANCEL",selectmode = "single")
Title for the list box.
Character vector of elements listing different choices
Character string returned by the script if the dialog box is canceled
Set to multiple to allow for multiple selections.
A TclTk dialog box.
# NOT RUN { tklist.modal("Select a color", c("red", "green", "blue")) # }
Run the code above in your browser using DataLab