FunctionPackage: cgToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.2
Unrevised from 8.1 to 8.2.
8.1 version

pop-up-string-dialog

Arguments: window-or-screen title prompt icon string button1 button2

Displays a modal dialog that prompts for one modifiable string. Returns three values. The first is the modified string, the second is nil and the third is the button number.

window-or-screen is the window with respect to which the dialog will be modal (no windows are disabled if the value is the screen). If nil, the stream returned by selected-window-or-screen will be used. title is a string to display in the title-bar of the dialog. prompt is a string to display in the body of the dialog, typically describing what the user should enter in the editable-text widget just below it.

icon is the handle of an icon to display in the dialog. Typically this is the value of one of the symbols information-icon, question-icon, warning-icon, or error-icon, but may alternately be an icon handle returned by extract-icon-from-file.

string is the string to initially display in the editable-text widget where the user enters a string. The whole string will initially be selected so that the user can easily replace it by simply typing.

button1 is a string to display on the leftmost button at the bottom of the dialog. If the user presses this button or presses the Enter key, then the third return value will be the number 1. A tilde character (~) may be included in the string to underline the next character, so that the user may press the button by holding down the Alt key and pressing the key for that character.

button2 is a string to display on the rightmost button at the bottom of the dialog. If the user presses this button or presses the Escape key, then the third return value will be the number 2. A tilde character (~) may be included in the string as with button1.

The position of the dialog when displayed is controlled by position-utility-dialog.

See also pop-up-strings-dialog and ask-user-for-string.

Example

(pop-up-string-dialog (or (selected-window (screen *system*))
                          (screen *system*))
                      "Answer Box"
                      "Give me one good reason why I should go away."
                      question-icon "initial answer"
                      "~OK" "~Cancel")

A typical usage of the returned strings would be to pass them to string-search.


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.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.2
Unrevised from 8.1 to 8.2.
8.1 version