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 System::NativeInt APrompts_High, System::UnicodeString *AValues, const System::NativeInt AValues_High) = 0 /* overload */;
プロパティ
| 種類 | 可視性 | ソース | ユニット | 親 |
|---|---|---|---|---|
| function | public | FMX.Platform.pas FMX.Platform.hpp |
FMX.Platform | IFMXDialogServiceSync |
説明
テキスト入力フィールドと OK ボタンを持つダイアログ ボックスを表示します。
InputQuerySync は同期ととって動作します。 InputQuerySync への呼び出しは、ユーザーがダイアログ ボックスを閉じた際にのみ終了します。 非同期に動作させるには、IFMXDialogServiceAsync.InputQueryAsync を使用します。
InputQuerySync は、次のパラメータを受け取ります:
ACaptionは、ダイアログ ボックスのタイトルです。APromptsは文字列の配列で、テキスト入力フィールドの左側にくるラベルとして使用されます。AValuesは、InputQuerySync がユーザーが入力したものを設定する、文字列の配列です。空文字列以外を使用すると、フィールドのデフォルト値を定義することができます。
- メモ:
AValuesの長さは、APromptsの長さ以上でなければなりません。
InputQuerySync は、ユーザーが OK ボタンをクリックした際に、True を返します。そうでなければ、False を返します。
InputQuerySync を、IFMXDialogServiceSync のインスタンスの必要なく呼び出すには、TDialogServiceSync.InputQuery を代わりに使用してください。
テキスト入力フィールドのコンテンツにマスクする
テキスト入力フィールドのコンテンツをマスクして、入力した際に実際の文字の代わりに点が表示されるようにするには、APrompts の相当ラベル文字列の最初に、SOH(start of heading)コントロール文字 を含めます。例:
- Delphi:
#1'Password:'
- C++:
"\1Password:"
サポート対象プラットフォーム
| プラットフォーム | サポート |
|---|---|
| Windows | |
| OS X | |
| iOS | |
| Android |