FMX.DialogService.TDialogService.InputQuery
Delphi
class procedure InputQuery(const ACaption: string; const APrompts: array of string; const AValues: array of string; const ACloseQueryProc: TInputCloseQueryProc); overload;
class procedure InputQuery(const ACaption: string; const APrompts: array of string; const AValues: array of string; const ACloseQueryEvent: TInputCloseQueryWithResultEvent; const AContext: TObject = nil); overload;
C++
__classmethod void __fastcall InputQuery(const System::UnicodeString ACaption, const System::UnicodeString *APrompts, const int APrompts_High, const System::UnicodeString *AValues, const int AValues_High, const Fmx::Dialogs::_di_TInputCloseQueryProc ACloseQueryProc)/* overload */;
__classmethod void __fastcall InputQuery(const System::UnicodeString ACaption, const System::UnicodeString *APrompts, const int APrompts_High, const System::UnicodeString *AValues, const int AValues_High, const Fmx::Dialogs::TInputCloseQueryWithResultEvent ACloseQueryEvent, System::TObject* const AContext = (System::TObject*)(0x0))/* overload */;
プロパティ
| 種類 | 可視性 | ソース | ユニット | 親 |
|---|---|---|---|---|
procedure function |
public | FMX.DialogService.pas FMX.DialogService.hpp |
FMX.DialogService | TDialogService |
説明
テキスト入力フィールドと[OK]ボタンを持つダイアログ ボックスを表示します。
InputQuery は、希望するモードに応じて同期または非同期で動作します。 InputQuery は内部的に TDialogServiceAsync.InputQuery または TDialogServiceSync.InputQuery を呼び出します。
PreferredMode が Platform に設定されている場合:
- デスクトップ プラットフォーム(Windows や OS X)では、InputQuery は同期で動作します。 この呼び出しは、ユーザーがダイアログ ボックスを閉じた際にのみ終了します。
- モバイル プラットフォーム(Android や iOS)では、InputQuery は非同期に動作します。 この呼び出しは、直ちに終了し、ユーザーがダイアログ ボックスを閉じるのを待ちません。
違うプラットフォームのために特定の動作を強いる場合には、PreferredMode を Sync または ASync(Android ではサポートされていない)に設定します。
InputQuery は、次のパラメータを受け取ります:
ACaptionは、ダイアログ ボックスのタイトルです。APromptsは文字列の配列で、テキスト入力フィールドの左側にくるラベルとして使用されます。AValuesは文字列のp配列で、フィールドのデフォルト値を定義します。- メモ:
AValuesの長さは、APromptsの長さ以上でなければなりません。
- メモ:
ACloseDialogProcまたはACloseQueryEventは任意の無名メソッドまたはイベント ハンドラで、ユーザーがダイアログ ボックスを閉じ、ユーザー入力を受けとった後に呼び出されます。AContextは任意のオブジェクトで、ACloseQueryEventに割り当てられたイベント ハンドラに対するコンテキストとして渡すことができます。