FMX.Platform.IFMXDialogServiceSync.InputQuerySync
Delphi
function InputQuerySync(const ACaption: string; const APrompts: array of string; var AValues: array of string): Boolean; overload;
C++
virtual bool __fastcall InputQuerySync(const System::UnicodeString ACaption, const System::UnicodeString *APrompts, const int APrompts_High, System::UnicodeString *AValues, const int AValues_High) = 0 /* overload */;
Contents
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | FMX.Platform.pas FMX.Platform.hpp |
FMX.Platform | IFMXDialogServiceSync |
Description
Displays a dialog box that contains text input fields and an OK button.
InputQuerySync works synchronously. Calls to InputQuerySync finish only when the user closes the dialog box. To work asynchronously, use IFMXDialogServiceAsync.InputQueryAsync.
InputQuerySync receives the following parameters:
ACaption
is the title of the dialog box.APrompts
is an array of strings to use as labels on the left-hand side of the text input fields.AValues
is an array of strings that InputQuerySync fills with the user input. Use non-empty strings to define default values for fields.
- Note: The length of
AValues
must be greater than or equal to the length ofAPrompts
.
InputQuerySync returns True
if the user clicks the OK button. It returns False
otherwise.
To call InputQuerySync without the need of an instance of IFMXDialogServiceSync, use TDialogServiceSync.InputQuery instead.
Masking the Content of a Text Input Field
To mask the content of a text input field, so that as you type dots are displayed instead of characters, include a start of heading (SOH) control character at the beginning of the corresponding label string from APrompts
. For example:
- Delphi:
#1'Password:'
- C++:
"\1Password:"
Platform Support
Platform | Support |
---|---|
Windows | ![]() |
OS X | ![]() |
iOS | ![]() |
Android |