This help topic is for R version 2.9.0. For the current version of R, try https://stat.ethz.ch/R-manual/R-patched/library/tcltk/html/tk_select.list.html
tk_select.list {tcltk}R Documentation

Select Items from a List

Description

Select item(s) from a character vector using a Tk listbox.

Usage

tk_select.list(list, preselect = NULL, multiple = FALSE, title = NULL)

Arguments

list

character. A list of items.

preselect

a character vector, or NULL. If non-null and if the string(s) appear in the list, the item(s) are selected initially.

multiple

logical: can more than one item be selected?

title

optional character string for window title.

Details

This is a version of select.list implemented as a Tk list box plus OK and Cancel buttons. There will be a scrollbar if the list is too long to fit comfortably on the screen.

The dialog box is modal, so a selection must be made or cancelled before the R session can proceed.

If Tk is version 8.5 or later, themed widgets will be used.

Value

A character vector of selected items. If multiple is false and no item was selected (or Cancel was used), "" is returned. If multiple is true and no item was selected (or Cancel was used) then a character vector of length 0 is returned.

See Also

select.list (a text version except on Windows), menu (whose graphics=TRUE mode uses this on most Unix-alikes.


[Package tcltk version 2.9.0 ]