FunctionPackage: cgToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.1
Unrevised from 10.0 to 10.1.
10.0 version

pop-up-strings-dialog

Arguments: window-or-screen title prompt1 icon string1 button1 button2 prompt2 string2

Displays a modal dialog that prompts for two modifiable strings. Returns three values. The first two are the modified strings, 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. prompt1 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.

string1 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.

prompt2 is a string to display in the dialog above the lower editable-text widget.

string2 is the string to initially display in the lower editable-text widget where the user enters a second string.

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

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

Example

(pop-up-strings-dialog
 (or (selected-window (screen *system*))
     (screen *system*))
 "Answer Box"
 #.(format nil "Enter a string to remove, followed by a string ~
                to substitute in its place.")
 question-icon "initial string to remove" "~OK" "~Cancel"
 "Replacement string:" "initial replacement string")

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


Copyright (c) 1998-2022, Franz Inc. Lafayette, CA., USA. All rights reserved.
This page was not revised from the 10.0 page.
Created 2019.8.20.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.1
Unrevised from 10.0 to 10.1.
10.0 version