FMX.Platform.IFMXDialogServiceAsync.InputQueryAsync

提供: RAD Studio API Documentation
移動先: 案内検索

Delphi

procedure InputQueryAsync(const ACaption: string; const APrompts: array of string; const ADefaultValues: array of string;  const ACloseDialogProc: TInputCloseQueryProc); overload;
procedure InputQueryAsync(const ACaption: string; const APrompts: array of string; const ADefaultValues: array of string;  const ACloseQueryEvent: TInputCloseQueryWithResultEvent; const AContext: TObject = nil); overload;

C++

virtual void __fastcall InputQueryAsync(const System::UnicodeString ACaption, const System::UnicodeString *APrompts, const int APrompts_High, const System::UnicodeString *ADefaultValues, const int ADefaultValues_High, const Fmx::Dialogs::_di_TInputCloseQueryProc ACloseDialogProc) = 0 /* overload */;
virtual void __fastcall InputQueryAsync(const System::UnicodeString ACaption, const System::UnicodeString *APrompts, const int APrompts_High, const System::UnicodeString *ADefaultValues, const int ADefaultValues_High, const Fmx::Dialogs::TInputCloseQueryWithResultEvent ACloseQueryEvent, System::TObject* const AContext = (System::TObject*)(0x0)) = 0 /* overload */;

プロパティ

種類 可視性 ソース ユニット
procedure
function
public
FMX.Platform.pas
FMX.Platform.hpp
FMX.Platform IFMXDialogServiceAsync


説明

テキスト入力フィールドOK ボタンを持つダイアログ ボックスを表示します。

InputQueryAsync は非同期に動作します。InputQueryAsync への呼び出しは即座に終了し、ユーザーがダイアログ ボックスを閉じるのを待ちません。同期的に動作させるには、IFMXDialogServiceSync.InputQuerySync を使用します。

InputQueryAsync は、次のパラメータを受け取ります:

  • ACaption は、ダイアログ ボックスのタイトルです。
  • APrompts文字列の配列で、テキスト入力フィールドの左側にくるラベルとして使用されます。
  • ADefaultValues は文字列のp配列で、フィールドのデフォルト値を定義します。
    メモ: ADefaultValues の長さは、APrompts の長さ以上でなければなりません。
  • ACloseDialogProc または ACloseQueryEvent は任意の無名メソッドまたはイベント ハンドラで、ユーザーがダイアログ ボックスを閉じ、ユーザー入力を受けとった後に呼び出されます。
  • AContext は任意のオブジェクトで、ACloseQueryEvent に割り当てられたイベント ハンドラに対するコンテキストとして渡すことができます。

ユーザーがダイアログ ボックスを閉じると、InputQueryAsync は指定された無名メソッドかイベント ハンドラを、次の引数で呼び出します:

  • SenderACloseQueryEvent のみ)は、指定された AContext を保有しています。
  • AResult は、ダイアログ ボックスを閉じるのに使用されるボタンのモーダル結果の値です。
  • AValues には、ユーザーがダイアログ ボックスのテキスト入力フィールドに入力した文字列が含まれています。

InputQueryAsync を、IFMXDialogServiceAsync のインスタンスの必要なく呼び出すには、TDialogServiceAsync.InputQuery を代わりに使用してください。

テキスト入力フィールドのコンテンツにマスクする

テキスト入力フィールドのコンテンツをマスクして、入力した際に実際の文字の代わりに点が表示されるようにするには、APrompts の相当ラベル文字列の最初に、SOH(start of heading)コントロール文字 を含めます。例:

  • Delphi: #1'Password:'
  • C++: "\1Password:"


サポート対象プラットフォーム

プラットフォーム [ サポート]
Windows
YesC++11Feature.png
OS X
YesC++11Feature.png
iOS
YesC++11Feature.png
Android
YesC++11Feature.png


関連項目