| Allegro CL version 8.2 Unrevised from 8.1 to 8.2. 8.1 version |
Arguments: title choice-list &key stream initial-value allow-multiple simple-click-toggle (on-print (quote princ-to-string)) on-change topmost width height dialog-exterior-box
Displays a modal dialog with title title offering
the choices in choice-list along with OK and
Cancel buttons. Two values are returned: the value or list of values
(if allow-multiple is true) chosen and t
if the OK button is clicked; nil
and nil
if the Cancel
button is clicked. (The second returned value allows the program to
distinguish between the user selecting the value nil
and canceling the dialog.)
The keyword arguments are:
nil
to select no value. If
allow-multiple is true, then the value may
alternately be a list containing any subset of the
choice-list elements. If the argument is not
specified (as opposed to specifying nil
),
then the first choice in choice-list will be
selected.
nil
(the default),
Control-click toggles individual choices; Shift-click selects
everything between the thing clicked on and a chosen item above,
inclusive; and a click chooses an item and unchooses anything else
selected, all of which is standard Windows behavior.
(ask-user-for-choice-from-list "X" (list 4 5 6) :on-print #'(lamdba (x) (format nil "~D" (+ 1 x))))
nil
or a function or function name. If
true, it is used as the on-change event handler for the
item-list of the ask-user-for-choice-from-list
dialog. The function will therefore be called as the user highlights
each choice in the dialog. This may be handy for showing a help
message for each choice. The function should take the three arguments
widget, new-value, and old-value (as usual with an on-change handler), and should
always return true (since returning nil
would prevent the user from successfully
selecting a choice). The default value of
on-change is nil
, which
causes an internal on-change handler to be used.
An alternative way to ask the user for a choice from a list, especially if the list of choices is small, is to call pop-up-menu, pop-up-lettered-menu, or pop-up-shortcut-menu. For four choices or fewer, ask-user-for-choice may be used. See also yes-no-or-cancel-list.
Copyright (c) 1998-2016, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 8.1 page.
Created 2010.1.21.
| Allegro CL version 8.2 Unrevised from 8.1 to 8.2. 8.1 version |