Vcl.Dialogs.InputBox
Delphi
function InputBox(const ACaption, APrompt, ADefault: string): string;
C++
extern DELPHI_PACKAGE System::UnicodeString __fastcall InputBox(const System::UnicodeString ACaption, const System::UnicodeString APrompt, const System::UnicodeString ADefault);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | Vcl.Dialogs.pas Vcl.Dialogs.hpp |
Vcl.Dialogs | Vcl.Dialogs |
Description
Displays an input dialog box that lets the user enter a string, double, or integer.
Call InputBox to bring up an input dialog box ready for the user to enter a string, double, or integer in its edit box.
- ACaption is the caption of the dialog box.
- APrompt is the text that prompts the user to enter input in the edit box.
- ADefault is the value that appears in the edit box when the dialog box first appears.
If the user chooses the Cancel button, InputBox returns the default value. If the user chooses the OK button, InputBox returns the value in the edit box.
Use the InputBox function when there is a default value that should be used when the user chooses the Cancel button (or presses Esc) to exit the dialog. If the application needs to know whether the user chooses OK or Cancel, use the InputQuery function instead.
See Also
- FMX.Platform.IFMXDialogServiceAsync.InputQueryAsync
- FMX.Platform.IFMXDialogServiceSync.InputQuerySync