Important: You do not have the latest version of CIMPLICITY! You are missing out on the newest capabilities and enhanced security. For information on all the latest features, see the CIMPLICITY product page. For more information on upgrades, contact your GE Digital sales agent or e-mail GE Digital Sales Support. For the most up-to-date documentation, go here.
Displays a dialog box requesting input from the user and returns that input as a String.
Comments
The AskBox/AskBox$ functions take the following parameters:
Parameter
Description
prompt$
String containing the text to be displayed above the text box. The dialog box is sized to the appropriate width depending on the width of prompt$. A runtime error is generated if prompt$ is Null.
default$
String containing the initial content of the text box. The user can return the default by immediately selecting OK. A runtime error is generated if default$ is Null.
title$
String specifying the title of the dialog. If missing, then the default title is used.
helpfile
Name of the file containing context-sensitive help for this dialog. If this parameter is specified, then context must also be specified.
context
Number specifying the ID of the topic within helpfile for this dialog's help. If this parameter is specified, then helpfile must also be specified.
Function
Returns
AskBox$
String containing the input typed by the user in the text box. A zero-length string is returned if the user selects Cancel.
AskBox
String variant containing the input typed by the user in the text box. An Empty variant is returned if the user selects Cancel.
When the dialog box is displayed, the text box has the focus.
The user can type a maximum of 255 characters into the text box displayed by AskBox$.If both the helpfile and context parameters are specified, then a Help button is added in addition to the OK and Cancel buttons. Context-sensitive help can be invoked by selecting this button or using the help key (F1). Invoking help does not remove the dialog.
s$ = AskBox$("Type in the filename:") s$ = AskBox$("Type in the filename:","filename.txt")
Example
This example asks the user to enter a filename and then displays what he or she has typed.
Sub Main()
s$ = AskBox$("Type in the filename:")
MsgBox "The filename was: " & s$
End Sub