--- title: textbox (XPFE autocomplete) slug: Archive/Mozilla/XUL/textbox_(Mozilla_autocomplete) tags: - XUL Elements - XUL Reference translation_of: Archive/Mozilla/XUL/Textbox_(XPFE_autocomplete) ---
この要素は、textbox の type 属性を autocomplete に設定することによって作成されます。これは、ユーザが入力しはじめると可能な補完リストが含まれるポップアップを表示する textbox を作成します。
自動補完 (autocomplete)機能は、一つ以上のセッションオブジェクトを通して扱われます。各セッションオブジェクトは textbox の現在の値に与えられた候補の一覧を返します。セッションは searchSessions 属性を使用するか、addSession メソッドを呼び出して設定することができます。
(例が必要)
alwaysopenpopup Gecko 1.9.1 で廃止true の場合、マッチするものがない時でも自動補完 popup が表示されます。デフォルト値の false の場合、popup は隠れます。この属性は Gecko1.9.1 で廃止されています。ポップアップの表示の制御には、代わりに minresultsforpopup 属性を使用します。autocompletesearch New in Thunderbird 2要 SeaMonkey 1.1nsIAutoCompleteSearch interface. The components are created using the name @mozilla.org/autocomplete/search;1?name= where name is listed in this attribute.search-autocomplete 要 SeaMonkey 2.1places-tag-autocomplete 要 SeaMonkey 2.1mydomain New in Thunderbird 3 要 SeaMonkey 2.0history 要 SeaMonkey 2.0form-history 要 SeaMonkey 2.0file (Linux only)gloda New in Thunderbird 3addrbook New in Thunderbird 3 要 SeaMonkey 2.0autocompletesearchparam New in Thunderbird 2 要 SeaMonkey 1.1autoFill Obsolete since Gecko 1.9.1true, the best match will be filled into the textbox as the user types. If false, the default, the value will not be filled in until the user selects an item. As of Gecko 1.9.1, this attribute is now always specified in lower case.autoFillAfterMatch 廃止 Gecko 1.9.1true に設定した場合、最もマッチするテキスト全体が入力したものの後に表示されます。false の場合、まだ入力していない部分のテキストのみが入力されます。この機能を使用するには textbox.autoFill 属性が true に設定されていなければなりません。Gecko1.9.1 より、この属性は completedefaultindex 属性に置き換わっています。autofill New in Thunderbird 3 要 SeaMonkey 2.0true に設定した場合、ユーザが入力したものに最もマッチする値が textbox に入力されます。デフォルト値の false の場合、ユーザが項目を選択するまで値は入力されません。completedefaultindex true の場合、ユーザが入力した値に最もマッチする値が textbox に入力されます。false に設定するか省略すると、値をリストから選択しなければなりません。 disableAutocomplete Obsolete since Gecko 1.9.1true, the autocomplete behavior will be disabled. You might use a script to change this attribute. If false, the default, autocomplete is enabled. As of Gecko 1.9.1, this attribute is now always specified in lower case.disableAutocomplete true の場合、自動補完が無効になります。この属性を変更するにはスクリプトを使用します。デフォルト値の false の場合、自動補完は有効になります。 disabledtrue に設定されていたら、その要素は無効化されています。無効化された要素は通常グレイ表示のテキストで描画されます。要素が無効化されていると、ユーザのアクションには応答せず、フォーカスもあてられず、command イベントも発生しません。
disablehistory false の場合、すべての利用可能な候補のドロップダウンメニューを開く矢印ボタンが textbox の末尾に表示されます。デフォルト値は、ドロップダウンボタンが隠れている true です。 enablehistory true の場合、矢印ボタンが textbox の末尾に現れます。この矢印が押されると、すべての使用可能な候補のドロップダウンメニューが開きます。 focused true です。 forceComplete Obsolete since Gecko 1.9.1true, the textbox will be filled in with the best match when it loses the focus. If false, it will only be filled in when the user selects an item. As of Gecko 1.9.1, this attribute is now always specified in lower case.forceComplete true の場合、textbox がフォーカスを失った時、最もマッチするものが入力されます。false の場合、ユーザが項目を選択した時のみ入力されます。 ignoreBlurWhileSearching Obsolete since Gecko 1.9.1true, blur events are ignored while searching, which means that the autocomplete popup will not disappear. As of Gecko 1.9.1, this attribute is now always specified in lower case.ignoreblurwhilesearching true の場合、検索中は blur イベントが無視され、自動補完 popup は表示されません。 inputtooltiptext label maxlength maxrows minResultsForPopup Obsolete since Gecko 1.9.1minresultsforpopup nomatch true に設定されます。 onerrorcommand ontextcommand ontextentered ontextrevert ontextreverted searchSessions history: ユーザの URL 訪問履歴が検索されます。addrbook: ユーザのアドレス帳が検索されます。ldap: ユーザの LDAP ディレクトリが検索されます。showCommentColumn Obsolete since Gecko 1.9.1true, a comment column appears in the popup. For the URL history, the comment column will contain the page titles associated with each URL. If this attribute is not specified, the comment column doesn't appear. As of Gecko 1.9.1, this attribute is now always specified in lower case.showCommentColumn true の場合、コメント列が popup 内に表示されます。URL 訪問履歴では、コメント列に各 URL に関連付けられたページタイトルが含まれます。この属性が指定されていない場合、コメント列は表示されません。 size tabScrolling Obsolete since Gecko 1.9.1true, the user may cycle through the results list by pressing the Tab key. If false, the default, the Tab key moves the focus to the next element.As of Gecko 1.9.1, this attribute is now always specified in lower case.tabScrolling true の場合、ユーザが Tab キーを押すことによって候補リストを上から繰り返すことができます。デフォルト値の false の場合、Tab キーはフォーカスを次の要素に移動します。 tabindex tab キーが押下されたときにフォーカスが移動する順番です。より大きな tabindex の値をもつ要素は、タブの遷移が後になります。 timeout typeautocomplete: 自動補完をサポートする textbox。自動補完 textbox についての詳しい情報は、自動補完 (autocomplete)のドキュメントをご覧ください。(Mozilla) (Firefox)number: 数字のみを入力することができる textbox。さらに、値を増減するための矢印ボタンが textbox の次に現れます。number textbox を設定するための属性は次のものがあります min および max, increment, wraparound, hidespinbuttons。 password: 入力した内容を隠す textbox。パスワードの入力に使用されます。timed: この textbox は、ユーザが文字を入力して時間が経つと command イベントを発生させます。遅延時間は timeout 属性で設定します。この形式は例えば、ユーザが入力した window の情報を更新するために使用します。ユーザが時間内にさらにキーを入力すれば、タイマーを発動させないために継続的に更新する必要はありません。ユーザが Enter キーを押下した場合にも command イベントが発生します。userAction none: ユーザは textbox に対して何もしていません。typing: ユーザは textbox に入力しています。scrolling: ユーザは textbox 内をスクロールしています。value
accessible alwaysOpenPopup alwaysopenpopup 属性の値の取得と設定。 autoFillAfterMatch 廃止 Gecko 1.9.1autoFillAfterMatch 属性の値の取得と設定。completeDefaultIndex completedefaultindex 属性の値の取得と設定。 disableAutocomplete disableAutocomplete 属性の値の取得と設定。 editable true if the element is editable. Autocomplete fields are editable so this property always returns true for those.forceComplete forcecomplete 属性の値の取得と設定。 ignoreBlurWhileSearchingignoreblurwhilesearching 属性の値の取得と設定。inputField isSearching true に設定されます。 isWaiting true に設定されます。 maxLength minResultsForPopup minresultsforpopup 属性の値の取得と設定。 noMatch true に設定されます。 resultsPopup searchSessions history: ユーザの URL 訪問履歴が検索されます。addrbook: ユーザのアドレス帳が検索されます。ldap: ユーザの LDAP ディレクトリが検索されます。selectionEnd selectionStart プロパティと共に使用します。この値は選択後の文字の index を指定します。この値が selectionStart プロパティの値と等しいときは text が選択されませんが、値は textbox 内のキャレット(カーソル) の位置を示します。 selectionStart selectionEnd プロパティと共に使用します。値は選択された最初の文字の index を指定します。 sessionCount showCommentColumn showcommentcolumn 属性の値の取得と設定。 tabScrolling tabscrolling 属性の値の取得と設定。 textLength userAction userAction 属性の値の取得と設定。 addSession( session )clearResults()getDefaultSessiongetResultAt( index )getResultCount( session )getResultValueAt( index )getSession( index )getSessionByName( name )nsIAutoCompleteSession 形式のオブジェクトを返します。getSessionResultAt( session, index )getSessionStatusAt( index )getSessionValueAt( session, index )removeSession( session )autocomplete ウィジェットからセッションオブジェクトを削除します。引数は nsIAutoCompleteSession インタフェースを実装するオブジェクトでなければなりません。select()setSelectionRange( start, end )syncSessions( autoCompleteElement )nsIAccessibleProvider, nsIDOMXULMenuListElement