\HeaderA{tk\_select.list}{Select Items from a List}{tk.Rul.select.list}
\keyword{utilities}{tk\_select.list}
\begin{Description}\relax
Select item(s) from a character vector using a Tk listbox.
\end{Description}
\begin{Usage}
\begin{verbatim}
tk_select.list(list, preselect = NULL, multiple = FALSE, title = NULL)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{list}] character. A list of items.
\item[\code{preselect}] a character vector, or \code{NULL}.  If non-null and
if the string(s) appear in the list, the item(s) are selected
initially.
\item[\code{multiple}] logical: can more than one item be selected?
\item[\code{title}] optional character string for window title.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
This is a version of \code{\LinkA{select.list}{select.list}} implemented as a Tk
list box plus \code{OK} and \code{Cancel} buttons.  There will be a
scrollbar if the list is too long to fit comfortably on the screen.

The dialog box is \emph{modal}, so a selection must be made or
cancelled before the \R{} session can proceed.
\end{Details}
\begin{Value}
A character vector of selected items.  If \code{multiple} is false and
no item was selected (or \code{Cancel} was used), \code{""} is
returned.   If \code{multiple} is true and no item was selected (or
\code{Cancel} was used) then a character vector of length 0 is returned.
\end{Value}
\begin{SeeAlso}\relax
\code{\LinkA{select.list}{select.list}} (a text version except on Windows),
\code{\LinkA{menu}{menu}} (whose \code{graphics=TRUE} mode uses this
on most Unix-alikes.
\end{SeeAlso}

