You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
438 KiB

2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. /*
  2. This file is part of Ext JS 3.4
  3. Copyright (c) 2011-2013 Sencha Inc
  4. Contact: http://www.sencha.com/contact
  5. GNU General Public License Usage
  6. This file may be used under the terms of the GNU General Public License version 3.0 as
  7. published by the Free Software Foundation and appearing in the file LICENSE included in the
  8. packaging of this file.
  9. Please review the following information to ensure the GNU General Public License version 3.0
  10. requirements will be met: http://www.gnu.org/copyleft/gpl.html.
  11. If you are unsure which license is appropriate for your use, please contact the sales department
  12. at http://www.sencha.com/contact.
  13. Build date: 2013-04-03 15:07:25
  14. */
  15. Ext.data.JsonP.Ext_form_ComboBox({"alternateClassNames":[],"aliases":{"widget":["combo"]},"enum":null,"parentMixins":[],"tagname":"class","subclasses":["Ext.form.TimeField"],"extends":"Ext.form.TriggerField","uses":[],"html":"<div><pre class=\"hierarchy\"><h4>Hierarchy</h4><div class='subclass first-child'><a href='#!/api/Ext.util.Observable' rel='Ext.util.Observable' class='docClass'>Ext.util.Observable</a><div class='subclass '><a href='#!/api/Ext.Component' rel='Ext.Component' class='docClass'>Ext.Component</a><div class='subclass '><a href='#!/api/Ext.BoxComponent' rel='Ext.BoxComponent' class='docClass'>Ext.BoxComponent</a><div class='subclass '><a href='#!/api/Ext.form.Field' rel='Ext.form.Field' class='docClass'>Ext.form.Field</a><div class='subclass '><a href='#!/api/Ext.form.TextField' rel='Ext.form.TextField' class='docClass'>Ext.form.TextField</a><div class='subclass '><a href='#!/api/Ext.form.TriggerField' rel='Ext.form.TriggerField' class='docClass'>Ext.form.TriggerField</a><div class='subclass '><strong>Ext.form.ComboBox</strong></div></div></div></div></div></div></div><h4>Subclasses</h4><div class='dependency'><a href='#!/api/Ext.form.TimeField' rel='Ext.form.TimeField' class='docClass'>Ext.form.TimeField</a></div><h4>Files</h4><div class='dependency'><a href='source/Combo.html#Ext-form-ComboBox' target='_blank'>Combo.js</a></div></pre><div class='doc-contents'><p>A combobox control with support for autocomplete, remote-loading, paging and many other features.</p>\n\n\n<p>A ComboBox works in a similar manner to a traditional HTML &lt;select> field. The difference is\nthat to submit the <a href=\"#!/api/Ext.form.ComboBox-cfg-valueField\" rel=\"Ext.form.ComboBox-cfg-valueField\" class=\"docClass\">valueField</a>, you must specify a <a href=\"#!/api/Ext.form.ComboBox-cfg-hiddenName\" rel=\"Ext.form.ComboBox-cfg-hiddenName\" class=\"docClass\">hiddenName</a> to create a hidden input\nfield to hold the value of the valueField. The <i><a href=\"#!/api/Ext.form.ComboBox-cfg-displayField\" rel=\"Ext.form.ComboBox-cfg-displayField\" class=\"docClass\">displayField</a></i> is shown in the text field\nwhich is named according to the <a href=\"#!/api/Ext.form.ComboBox-cfg-name\" rel=\"Ext.form.ComboBox-cfg-name\" class=\"docClass\">name</a>.</p>\n\n\n<p><b><u>Events</u></b></p>\n\n\n<p>To do something when something in ComboBox is selected, configure the select event:\n<pre><code>var cb = new <a href=\"#!/api/Ext.form.ComboBox\" rel=\"Ext.form.ComboBox\" class=\"docClass\">Ext.form.ComboBox</a>({\n // all of your config options\n listeners:{\n scope: yourScope,\n 'select': yourFunction\n }\n});\n\n// Alternatively, you can assign events after the object is created:\nvar cb = new <a href=\"#!/api/Ext.form.ComboBox\" rel=\"Ext.form.ComboBox\" class=\"docClass\">Ext.form.ComboBox</a>(yourOptions);\ncb.on('select', yourFunction, yourScope);\n</code></pre></p>\n\n\n\n\n<p><b><u>ComboBox in Grid</u></b></p>\n\n\n<p>If using a ComboBox in an <a href=\"#!/api/Ext.grid.EditorGridPanel\" rel=\"Ext.grid.EditorGridPanel\" class=\"docClass\">Editor Grid</a> a <a href=\"#!/api/Ext.grid.Column-property-renderer\" rel=\"Ext.grid.Column-property-renderer\" class=\"docClass\">renderer</a>\nwill be needed to show the displayField when the editor is not active. Set up the renderer manually, or implement\na reusable render, for example:\n<pre><code>// create reusable renderer\nExt.util.Format.comboRenderer = function(combo){\n return function(value){\n var record = combo.findRecord(combo.<a href=\"#!/api/Ext.form.ComboBox-cfg-valueField\" rel=\"Ext.form.ComboBox-cfg-valueField\" class=\"docClass\">valueField</a>, value);\n return record ? record.get(combo.<a href=\"#!/api/Ext.form.ComboBox-cfg-displayField\" rel=\"Ext.form.ComboBox-cfg-displayField\" class=\"docClass\">displayField</a>) : combo.<a href=\"#!/api/Ext.form.ComboBox-cfg-valueNotFoundText\" rel=\"Ext.form.ComboBox-cfg-valueNotFoundText\" class=\"docClass\">valueNotFoundText</a>;\n }\n}\n\n// create the combo instance\nvar combo =