ShowInputBox |
Top Previous Next |
Prototype
StrResult:=ShowInputBox (strTitle, strPrompt, strDefault)
Description
It shows a dialog window that allows to insert a text string.
Parameters
StrTitle: string representing the window title of dialog type.
StrPrompt: string that contains the text inserted in the dialog window.
StrDefault: default string.
Returned value
StrResult: string that contains the text, if there is not a text it is empty.
Notes
None.
Example
//File name request File:= ShowInputBox('Print file','Insert the name of the file to open','');
//It checks the file existence Existed:=FileExists(File);
//If the file exists then… If Existed = True then
Begin // It opens the file ShellOpen(File);
//it asks for confirming the file print Print:=ShowConfirm('Print the file ' + File);
//If affirmative, it will print file If print=true then ShellPrint(File); End
//If file doesn't exist, it shows a message. Else ShowMessage('The file is not found');
|