/javascripts/lib/docs/output/Ext.ProgressBar.html
HTML | 1033 lines | 1023 code | 10 blank | 0 comment | 0 complexity | 1fd6a785f7873c536622c517066dcf24 MD5 | raw file
Possible License(s): GPL-3.0
Large files files are truncated, but you can click here to view the full file
1<div class="body-wrap" xmlns:ext="http://www.extjs.com"><div class="top-tools"><a class="inner-link" href="#Ext.ProgressBar-props"><img src="../resources/images/default/s.gif" class="item-icon icon-prop">Properties</a> <a class="inner-link" href="#Ext.ProgressBar-methods"><img src="../resources/images/default/s.gif" class="item-icon icon-method">Methods</a> <a class="inner-link" href="#Ext.ProgressBar-events"><img src="../resources/images/default/s.gif" class="item-icon icon-event">Events</a> <a class="inner-link" href="#Ext.ProgressBar-configs"><img src="../resources/images/default/s.gif" class="item-icon icon-config">Config Options</a> <a class="bookmark" href="../docs/?class=Ext.ProgressBar"><img src="../resources/images/default/s.gif" class="item-icon icon-fav">Direct Link</a> </div><div class="inheritance res-block"><pre class="res-block-inner"><a href="output/Ext.util.Observable.html" ext:member="" ext:cls="Ext.util.Observable">Observable</a> <img src="resources/elbow-end.gif"><a href="output/Ext.Component.html" ext:member="" ext:cls="Ext.Component">Component</a> <img src="resources/elbow-end.gif"><a href="output/Ext.BoxComponent.html" ext:member="" ext:cls="Ext.BoxComponent">BoxComponent</a> <img src="resources/elbow-end.gif">ProgressBar</pre></div><h1>Class <a href="source/ProgressBar.html#cls-Ext.ProgressBar">Ext.ProgressBar</a></h1><table cellspacing="0"><tr><td class="label">Package:</td><td class="hd-info">Ext</td></tr><tr><td class="label">Defined In:</td><td class="hd-info"><a href="source/ProgressBar.html#cls-Ext.ProgressBar">ProgressBar.js</a></td></tr><tr><td class="label">Class:</td><td class="hd-info"><a href="source/ProgressBar.html#cls-Ext.ProgressBar">ProgressBar</a></td></tr><tr><td class="label">Extends:</td><td class="hd-info"><a href="output/Ext.BoxComponent.html" ext:cls="Ext.BoxComponent" ext:member="">BoxComponent</a></td></tr></table><div class="description"><p>An updateable progress bar component. The progress bar supports two different modes: manual and automatic.</p> 2<p>In manual mode, you are responsible for showing, updating (via <a href="output/Ext.ProgressBar.html#Ext.ProgressBar-updateProgress" ext:member="updateProgress" ext:cls="Ext.ProgressBar">updateProgress</a>) and clearing the 3progress bar as needed from your own code. This method is most appropriate when you want to show progress 4throughout an operation that has predictable points of interest at which you can update the control.</p> 5<p>In automatic mode, you simply call <a href="output/Ext.ProgressBar.html#Ext.ProgressBar-wait" ext:member="wait" ext:cls="Ext.ProgressBar">wait</a> and let the progress bar run indefinitely, only clearing it 6once the operation is complete. You can optionally have the progress bar wait for a specific amount of time 7and then clear itself. Automatic mode is most appropriate for timed operations or asynchronous operations in 8which you have no need for indicating intermediate progress.</p></div><div class="hr"></div><a id="Ext.ProgressBar-configs"></a><h2>Config Options</h2><table cellspacing="0" class="member-table"><tbody><tr><th colspan="2" class="sig-header">Config Options</th><th class="msource-header">Defined By</th></tr><tr class="config-row inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.Component-allowDomMove"></a><b><a href="source/Component.html#cfg-Ext.Component-allowDomMove">allowDomMove</a></b> : Boolean<div class="mdesc">Whether the component can move the Dom node when rendering (defaults to true).</div></td><td class="msource"><a href="output/Ext.Component.html#allowDomMove" ext:member="#allowDomMove" ext:cls="Ext.Component">Component</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.BoxComponent-anchor"></a><b><a href="source/BoxComponent.html#cfg-Ext.BoxComponent-anchor">anchor</a></b> : String<div class="mdesc"><div class="short">Note: this config is only used when this Component is rendered 9by a Container which has been configured to use an Anc...</div><div class="long"><p><b>Note</b>: this config is only used when this Component is rendered 10by a Container which has been configured to use an <b><a href="output/Ext.layout.AnchorLayout.html" ext:cls="Ext.layout.AnchorLayout">AnchorLayout</a> (or subclass thereof).</b> 11based layout manager, for example:<div class="mdetail-params"><ul> 12<li><a href="output/Ext.form.FormPanel.html" ext:cls="Ext.form.FormPanel">Ext.form.FormPanel</a></li> 13<li>specifying <code>layout: <em>'anchor'</em> <i>// or <em>'form'</em>, or <em>'absolute'</em></i></code></li> 14</ul></div></p> 15<p>See <a href="output/Ext.layout.AnchorLayout.html" ext:cls="Ext.layout.AnchorLayout">Ext.layout.AnchorLayout</a>.<a href="output/Ext.layout.AnchorLayout.html#Ext.layout.AnchorLayout-anchor" ext:member="anchor" ext:cls="Ext.layout.AnchorLayout">anchor</a> also.</p></div></div></td><td class="msource"><a href="output/Ext.BoxComponent.html#anchor" ext:member="#anchor" ext:cls="Ext.BoxComponent">BoxComponent</a></td></tr><tr class="config-row "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.ProgressBar-animate"></a><b><a href="source/ProgressBar.html#cfg-Ext.ProgressBar-animate">animate</a></b> : Boolean<div class="mdesc">True to animate the progress bar during transitions (defaults to false)</div></td><td class="msource">ProgressBar</td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.Component-applyTo"></a><b><a href="source/Component.html#cfg-Ext.Component-applyTo">applyTo</a></b> : Mixed<div class="mdesc"><div class="short">Specify the id of the element, a DOM element or an existing Element corresponding to a DIV 16that is already present in...</div><div class="long"><p>Specify the id of the element, a DOM element or an existing Element corresponding to a DIV 17that is already present in the document that specifies some structural markup for this 18component.</p><div><ul> 19<li><b>Description</b> : <ul> 20<div class="sub-desc">When <tt>applyTo</tt> is used, constituent parts of the component can also be specified 21by id or CSS class name within the main element, and the component being created may attempt 22to create its subcomponents from that markup if applicable.</div> 23</ul></li> 24<li><b>Notes</b> : <ul> 25<div class="sub-desc">When using this config, a call to render() is not required.</div> 26<div class="sub-desc">If applyTo is specified, any value passed for <a href="output/Ext.Component.html#Ext.Component-renderTo" ext:member="renderTo" ext:cls="Ext.Component">renderTo</a> will be ignored and the target 27element's parent node will automatically be used as the component's container.</div> 28</ul></li> 29</ul></div></div></div></td><td class="msource"><a href="output/Ext.Component.html#applyTo" ext:member="#applyTo" ext:cls="Ext.Component">Component</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.Component-autoEl"></a><b><a href="source/Component.html#cfg-Ext.Component-autoEl">autoEl</a></b> : Mixed<div class="mdesc"><div class="short">A tag name or DomHelper spec used to create the Element which will 30encapsulate this Component. 31You do not normally ne...</div><div class="long"><p>A tag name or <a href="output/Ext.DomHelper.html" ext:cls="Ext.DomHelper">DomHelper</a> spec used to create the <a href="output/Ext.Component.html#Ext.Component-getEl" ext:member="getEl" ext:cls="Ext.Component">Element</a> which will 32encapsulate this Component.</p> 33<p>You do not normally need to specify this. For the base classes <a href="output/Ext.Component.html" ext:cls="Ext.Component">Ext.Component</a>, <a href="output/Ext.BoxComponent.html" ext:cls="Ext.BoxComponent">Ext.BoxComponent</a>, 34and <a href="output/Ext.Container.html" ext:cls="Ext.Container">Ext.Container</a>, this defaults to <b><tt>'div'</tt></b>. The more complex Ext classes use a more complex 35DOM structure created by their own onRender methods.</p> 36<p>This is intended to allow the developer to create application-specific utility Components encapsulated by 37different DOM elements. Example usage:</p><pre><code>{ 38 xtype: <em>'box'</em>, 39 autoEl: { 40 tag: <em>'img'</em>, 41 src: <em>'http:<i>//www.example.com/example.jpg'</em></i> 42 } 43}, { 44 xtype: <em>'box'</em>, 45 autoEl: { 46 tag: <em>'blockquote'</em>, 47 html: <em>'autoEl is cool!'</em> 48 } 49}, { 50 xtype: <em>'container'</em>, 51 autoEl: <em>'ul'</em>, 52 cls: <em>'ux-unordered-list'</em>, 53 items: { 54 xtype: <em>'box'</em>, 55 autoEl: <em>'li'</em>, 56 html: <em>'First list item'</em> 57 } 58}</code></pre></div></div></td><td class="msource"><a href="output/Ext.Component.html#autoEl" ext:member="#autoEl" ext:cls="Ext.Component">Component</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.BoxComponent-autoHeight"></a><b><a href="source/BoxComponent.html#cfg-Ext.BoxComponent-autoHeight">autoHeight</a></b> : Boolean<div class="mdesc"><div class="short">True to use height:'auto', false to use fixed height (or allow it to be managed by its parent 59Container's layout mana...</div><div class="long"><p>True to use height:'auto', false to use fixed height (or allow it to be managed by its parent 60Container's <a href="output/Ext.Container.html#Ext.Container-layout" ext:member="layout" ext:cls="Ext.Container">layout manager</a>. Defaults to false.</p> 61<p><b>Note</b>: Although many components inherit this config option, not all will 62function as expected with a height of 'auto'. Setting autoHeight:true means that the 63browser will manage height based on the element's contents, and that Ext will not manage it at all.</p> 64<p>If the <i>browser</i> is managing the height, be aware that resizes performed by the browser in response 65to changes within the structure of the Component cannot be detected. Therefore changes to the height might 66result in elements needing to be synchronized with the new height. Example:</p><pre><code><b>var</b> w = <b>new</b> Ext.Window({ 67 title: <em>'Window'</em>, 68 width: 600, 69 autoHeight: true, 70 items: { 71 title: <em>'Collapse Me'</em>, 72 height: 400, 73 collapsible: true, 74 border: false, 75 listeners: { 76 beforecollapse: <b>function</b>() { 77 w.el.shadow.hide(); 78 }, 79 beforeexpand: <b>function</b>() { 80 w.el.shadow.hide(); 81 }, 82 collapse: <b>function</b>() { 83 w.syncShadow(); 84 }, 85 expand: <b>function</b>() { 86 w.syncShadow(); 87 } 88 } 89 } 90}).show();</code></pre></div></div></td><td class="msource"><a href="output/Ext.BoxComponent.html#autoHeight" ext:member="#autoHeight" ext:cls="Ext.BoxComponent">BoxComponent</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.BoxComponent-autoScroll"></a><b><a href="source/BoxComponent.html#cfg-Ext.BoxComponent-autoScroll">autoScroll</a></b> : Boolean<div class="mdesc"><div class="short">true to use overflow:'auto' on the components layout element and show scroll bars automatically when 91necessary, false...</div><div class="long"><code>true</code> to use overflow:'auto' on the components layout element and show scroll bars automatically when 92necessary, <code>false</code> to clip any overflowing content (defaults to <code>false</code>).</div></div></td><td class="msource"><a href="output/Ext.BoxComponent.html#autoScroll" ext:member="#autoScroll" ext:cls="Ext.BoxComponent">BoxComponent</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.Component-autoShow"></a><b><a href="source/Component.html#cfg-Ext.Component-autoShow">autoShow</a></b> : Boolean<div class="mdesc"><div class="short">True if the component should check for hidden classes (e.g. 'x-hidden' or 'x-hide-display') and remove 93them on render...</div><div class="long">True if the component should check for hidden classes (e.g. 'x-hidden' or 'x-hide-display') and remove 94them on render (defaults to false).</div></div></td><td class="msource"><a href="output/Ext.Component.html#autoShow" ext:member="#autoShow" ext:cls="Ext.Component">Component</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.BoxComponent-autoWidth"></a><b><a href="source/BoxComponent.html#cfg-Ext.BoxComponent-autoWidth">autoWidth</a></b> : Boolean<div class="mdesc"><div class="short">True to use width:'auto', false to use fixed width (or allow it to be managed by its parent 95Container's layout manage...</div><div class="long"><p>True to use width:'auto', false to use fixed width (or allow it to be managed by its parent 96Container's <a href="output/Ext.Container.html#Ext.Container-layout" ext:member="layout" ext:cls="Ext.Container">layout manager</a>. Defaults to false.</p> 97<p><b>Note</b>: Although many components inherit this config option, not all will 98function as expected with a width of 'auto'. Setting autoWidth:true means that the 99browser will manage width based on the element's contents, and that Ext will not manage it at all.</p> 100<p>If the <i>browser</i> is managing the width, be aware that resizes performed by the browser in response 101to changes within the structure of the Component cannot be detected. Therefore changes to the width might 102result in elements needing to be synchronized with the new width. For example, where the target element is:</p><pre><code><div id=<em>'grid-container'</em> style=<em>'margin-left:25%;width:50%'</em>></div></code></pre> 103A Panel rendered into that target element must listen for browser window resize in order to relay its 104child items when the browser changes its width:<pre><code><b>var</b> myPanel = <b>new</b> Ext.Panel({ 105 renderTo: <em>'grid-container'</em>, 106 monitorResize: true, <i>// relay on browser resize</i> 107 title: <em>'Panel'</em>, 108 height: 400, 109 autoWidth: true, 110 layout: <em>'hbox'</em>, 111 layoutConfig: { 112 align: <em>'stretch'</em> 113 }, 114 defaults: { 115 flex: 1 116 }, 117 items: [{ 118 title: <em>'Box 1'</em>, 119 }, { 120 title: <em>'Box 2'</em> 121 }, { 122 title: <em>'Box 3'</em> 123 }], 124});</code></pre></div></div></td><td class="msource"><a href="output/Ext.BoxComponent.html#autoWidth" ext:member="#autoWidth" ext:cls="Ext.BoxComponent">BoxComponent</a></td></tr><tr class="config-row "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.ProgressBar-baseCls"></a><b><a href="source/ProgressBar.html#cfg-Ext.ProgressBar-baseCls">baseCls</a></b> : String<div class="mdesc">The base CSS class to apply to the progress bar's wrapper element (defaults to 'x-progress')</div></td><td class="msource">ProgressBar</td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.BoxComponent-boxMaxHeight"></a><b><a href="source/BoxComponent.html#cfg-Ext.BoxComponent-boxMaxHeight">boxMaxHeight</a></b> : Number<div class="mdesc"><div class="short">The maximum value in pixels which this BoxComponent will set its height to. 125Warning: This will override any size mana...</div><div class="long"><p>The maximum value in pixels which this BoxComponent will set its height to.</p> 126<p><b>Warning:</b> This will override any size management applied by layout managers.</p></div></div></td><td class="msource"><a href="output/Ext.BoxComponent.html#boxMaxHeight" ext:member="#boxMaxHeight" ext:cls="Ext.BoxComponent">BoxComponent</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.BoxComponent-boxMaxWidth"></a><b><a href="source/BoxComponent.html#cfg-Ext.BoxComponent-boxMaxWidth">boxMaxWidth</a></b> : Number<div class="mdesc"><div class="short">The maximum value in pixels which this BoxComponent will set its width to. 127Warning: This will override any size manag...</div><div class="long"><p>The maximum value in pixels which this BoxComponent will set its width to.</p> 128<p><b>Warning:</b> This will override any size management applied by layout managers.</p></div></div></td><td class="msource"><a href="output/Ext.BoxComponent.html#boxMaxWidth" ext:member="#boxMaxWidth" ext:cls="Ext.BoxComponent">BoxComponent</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.BoxComponent-boxMinHeight"></a><b><a href="source/BoxComponent.html#cfg-Ext.BoxComponent-boxMinHeight">boxMinHeight</a></b> : Number<div class="mdesc"><div class="short">The minimum value in pixels which this BoxComponent will set its height to. 129Warning: This will override any size mana...</div><div class="long"><p>The minimum value in pixels which this BoxComponent will set its height to.</p> 130<p><b>Warning:</b> This will override any size management applied by layout managers.</p></div></div></td><td class="msource"><a href="output/Ext.BoxComponent.html#boxMinHeight" ext:member="#boxMinHeight" ext:cls="Ext.BoxComponent">BoxComponent</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.BoxComponent-boxMinWidth"></a><b><a href="source/BoxComponent.html#cfg-Ext.BoxComponent-boxMinWidth">boxMinWidth</a></b> : Number<div class="mdesc"><div class="short">The minimum value in pixels which this BoxComponent will set its width to. 131Warning: This will override any size manag...</div><div class="long"><p>The minimum value in pixels which this BoxComponent will set its width to.</p> 132<p><b>Warning:</b> This will override any size management applied by layout managers.</p></div></div></td><td class="msource"><a href="output/Ext.BoxComponent.html#boxMinWidth" ext:member="#boxMinWidth" ext:cls="Ext.BoxComponent">BoxComponent</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.Component-bubbleEvents"></a><b><a href="source/Component.html#cfg-Ext.Component-bubbleEvents">bubbleEvents</a></b> : Array<div class="mdesc"><div class="short">An array of events that, when fired, should be bubbled to any parent container. 133See Ext.util.Observable.enableBubble....</div><div class="long"><p>An array of events that, when fired, should be bubbled to any parent container. 134See <a href="output/Ext.util.Observable.html#Ext.util.Observable-enableBubble" ext:member="enableBubble" ext:cls="Ext.util.Observable">Ext.util.Observable.enableBubble</a>. 135Defaults to <tt>[]</tt>.</div></div></td><td class="msource"><a href="output/Ext.Component.html#bubbleEvents" ext:member="#bubbleEvents" ext:cls="Ext.Component">Component</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.Component-clearCls"></a><b><a href="source/Component.html#cfg-Ext.Component-clearCls">clearCls</a></b> : String<div class="mdesc"><div class="short">The CSS class used to to apply to the special clearing div rendered 136directly after each form field wrapper to provide...</div><div class="long"><p>The CSS class used to to apply to the special clearing div rendered 137directly after each form field wrapper to provide field clearing (defaults to 138<tt>'x-form-clear-left'</tt>).</p> 139<br><p><b>Note</b>: this config is only used when this Component is rendered by a Container 140which has been configured to use the <b><a href="output/Ext.layout.FormLayout.html" ext:cls="Ext.layout.FormLayout">FormLayout</a></b> layout 141manager (e.g. <a href="output/Ext.form.FormPanel.html" ext:cls="Ext.form.FormPanel">Ext.form.FormPanel</a> or specifying <tt>layout:'form'</tt>) and either a 142<tt><a href="output/Ext.Component.html#Ext.Component-fieldLabel" ext:member="fieldLabel" ext:cls="Ext.Component">fieldLabel</a></tt> is specified or <tt>isFormField=true</tt> is specified.</p><br> 143<p>See <a href="output/Ext.layout.FormLayout.html" ext:cls="Ext.layout.FormLayout">Ext.layout.FormLayout</a>.<a href="output/Ext.layout.FormLayout.html#Ext.layout.FormLayout-fieldTpl" ext:member="fieldTpl" ext:cls="Ext.layout.FormLayout">fieldTpl</a> also.</p></div></div></td><td class="msource"><a href="output/Ext.Component.html#clearCls" ext:member="#clearCls" ext:cls="Ext.Component">Component</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.Component-cls"></a><b><a href="source/Component.html#cfg-Ext.Component-cls">cls</a></b> : String<div class="mdesc"><div class="short">An optional extra CSS class that will be added to this component's Element (defaults to ''). This can be 144useful for ...</div><div class="long">An optional extra CSS class that will be added to this component's Element (defaults to ''). This can be 145useful for adding customized styles to the component or any of its children using standard CSS rules.</div></div></td><td class="msource"><a href="output/Ext.Component.html#cls" ext:member="#cls" ext:cls="Ext.Component">Component</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.Component-contentEl"></a><b><a href="source/Component.html#cfg-Ext.Component-contentEl">contentEl</a></b> : String<div class="mdesc"><div class="short">Optional. Specify an existing HTML element, or the id of an existing HTML element to use as the content 146for this comp...</div><div class="long"><p>Optional. Specify an existing HTML element, or the <code>id</code> of an existing HTML element to use as the content 147for this component.</p> 148<ul> 149<li><b>Description</b> : 150<div class="sub-desc">This config option is used to take an existing HTML element and place it in the layout element 151of a new component (it simply moves the specified DOM element <i>after the Component is rendered</i> to use as the content.</div></li> 152<li><b>Notes</b> : 153<div class="sub-desc">The specified HTML element is appended to the layout element of the component <i>after any configured 154<a href="output/Ext.Component.html#Ext.Component-html" ext:member="html" ext:cls="Ext.Component">HTML</a> has been inserted</i>, and so the document will not contain this element at the time the <a href="output/Ext.Component.html#Ext.Component-render" ext:member="render" ext:cls="Ext.Component">render</a> event is fired.</div> 155<div class="sub-desc">The specified HTML element used will not participate in any <code><b><a href="output/Ext.Container.html#Ext.Container-layout" ext:member="layout" ext:cls="Ext.Container">layout</a></b></code> 156scheme that the Component may use. It is just HTML. Layouts operate on child <code><b><a href="output/Ext.Container.html#Ext.Container-items" ext:member="items" ext:cls="Ext.Container">items</a></b></code>.</div> 157<div class="sub-desc">Add either the <code>x-hidden</code> or the <code>x-hide-display</code> CSS class to 158prevent a brief flicker of the content before it is rendered to the panel.</div></li> 159</ul></div></div></td><td class="msource"><a href="output/Ext.Component.html#contentEl" ext:member="#contentEl" ext:cls="Ext.Component">Component</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.Component-ctCls"></a><b><a href="source/Component.html#cfg-Ext.Component-ctCls">ctCls</a></b> : String<div class="mdesc"><div class="short">An optional extra CSS class that will be added to this component's container. This can be useful for 160adding customize...</div><div class="long"><p>An optional extra CSS class that will be added to this component's container. This can be useful for 161adding customized styles to the container or any of its children using standard CSS rules. See 162<a href="output/Ext.layout.ContainerLayout.html" ext:cls="Ext.layout.ContainerLayout">Ext.layout.ContainerLayout</a>.<a href="output/Ext.layout.ContainerLayout.html#Ext.layout.ContainerLayout-extraCls" ext:member="extraCls" ext:cls="Ext.layout.ContainerLayout">extraCls</a> also.</p> 163<p><b>Note</b>: <tt>ctCls</tt> defaults to <tt>''</tt> except for the following class 164which assigns a value by default: 165<div class="mdetail-params"><ul> 166<li><a href="output/Ext.layout.Box.html" ext:cls="Ext.layout.Box">Box Layout</a> : <tt>'x-box-layout-ct'</tt></li> 167</ul></div> 168To configure the above Class with an extra CSS class append to the default. For example, 169for BoxLayout (Hbox and Vbox):<pre><code>ctCls: <em>'x-box-layout-ct custom-class'</em></code></pre> 170</p></div></div></td><td class="msource"><a href="output/Ext.Component.html#ctCls" ext:member="#ctCls" ext:cls="Ext.Component">Component</a></td></tr><tr class="config-row inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.Component-data"></a><b><a href="source/Component.html#cfg-Ext.Component-data">data</a></b> : Mixed<div class="mdesc">The initial set of data to apply to the <code><a href="output/Ext.Component.html#Ext.Component-tpl" ext:member="tpl" ext:cls="Ext.Component">tpl</a></code> to 171update the content area of the Component.</div></td><td class="msource"><a href="output/Ext.Component.html#data" ext:member="#data" ext:cls="Ext.Component">Component</a></td></tr><tr class="config-row inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.Component-disabled"></a><b><a href="source/Component.html#cfg-Ext.Component-disabled">disabled</a></b> : Boolean<div class="mdesc">Render this component disabled (default is false).</div></td><td class="msource"><a href="output/Ext.Component.html#disabled" ext:member="#disabled" ext:cls="Ext.Component">Component</a></td></tr><tr class="config-row inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.Component-disabledClass"></a><b><a href="source/Component.html#cfg-Ext.Component-disabledClass">disabledClass</a></b> : String<div class="mdesc">CSS class added to the component when it is disabled (defaults to 'x-item-disabled').</div></td><td class="msource"><a href="output/Ext.Component.html#disabledClass" ext:member="#disabledClass" ext:cls="Ext.Component">Component</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.Component-fieldLabel"></a><b><a href="source/Component.html#cfg-Ext.Component-fieldLabel">fieldLabel</a></b> : String<div class="mdesc"><div class="short">The label text to display next to this Component (defaults to ''). 172Note: this config is only used when this Component...</div><div class="long"><p>The label text to display next to this Component (defaults to '').</p> 173<br><p><b>Note</b>: this config is only used when this Component is rendered by a Container which 174has been configured to use the <b><a href="output/Ext.layout.FormLayout.html" ext:cls="Ext.layout.FormLayout">FormLayout</a></b> layout manager (e.g. 175<a href="output/Ext.form.FormPanel.html" ext:cls="Ext.form.FormPanel">Ext.form.FormPanel</a> or specifying <tt>layout:'form'</tt>).</p><br> 176<p>Also see <tt><a href="output/Ext.Component.html#Ext.Component-hideLabel" ext:member="hideLabel" ext:cls="Ext.Component">hideLabel</a></tt> and 177<a href="output/Ext.layout.FormLayout.html" ext:cls="Ext.layout.FormLayout">Ext.layout.FormLayout</a>.<a href="output/Ext.layout.FormLayout.html#Ext.layout.FormLayout-fieldTpl" ext:member="fieldTpl" ext:cls="Ext.layout.FormLayout">fieldTpl</a>.</p> 178Example use:<pre><code><b>new</b> Ext.FormPanel({ 179 height: 100, 180 renderTo: Ext.getBody(), 181 items: [{ 182 xtype: <em>'textfield'</em>, 183 fieldLabel: <em>'Name'</em> 184 }] 185});</code></pre></div></div></td><td class="msource"><a href="output/Ext.Component.html#fieldLabel" ext:member="#fieldLabel" ext:cls="Ext.Component">Component</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.BoxComponent-flex"></a><b><a href="source/BoxComponent.html#cfg-Ext.BoxComponent-flex">flex</a></b> : Number<div class="mdesc"><div class="short">Note: this config is only used when this Component is rendered 186by a Container which has been configured to use a BoxL...</div><div class="long"><p><b>Note</b>: this config is only used when this Component is rendered 187by a Container which has been configured to use a <b><a href="output/Ext.layout.BoxLayout.html" ext:cls="Ext.layout.BoxLayout">BoxLayout</a>.</b> 188Each child Component with a <code>flex</code> property will be flexed either vertically (by a VBoxLayout) 189or horizontally (by an HBoxLayout) according to the item's <b>relative</b> <code>flex</code> value 190compared to the sum of all Components with <code>flex</flex> value specified. Any child items that have 191either a <code>flex = 0</code> or <code>flex = undefined</code> will not be 'flexed' (the initial size will not be changed).</div></div></td><td class="msource"><a href="output/Ext.BoxComponent.html#flex" ext:member="#flex" ext:cls="Ext.BoxComponent">BoxComponent</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.BoxComponent-height"></a><b><a href="source/BoxComponent.html#cfg-Ext.BoxComponent-height">height</a></b> : Number<div class="mdesc"><div class="short">The height of this component in pixels (defaults to auto). 192Note to express this dimension as a percentage or offset s...</div><div class="long">The height of this component in pixels (defaults to auto). 193<b>Note</b> to express this dimension as a percentage or offset see <a href="output/Ext.Component.html#Ext.Component-anchor" ext:member="anchor" ext:cls="Ext.Component">Ext.Component.anchor</a>.</div></div></td><td class="msource"><a href="output/Ext.BoxComponent.html#height" ext:member="#height" ext:cls="Ext.BoxComponent">BoxComponent</a></td></tr><tr class="config-row inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.Component-hidden"></a><b><a href="source/Component.html#cfg-Ext.Component-hidden">hidden</a></b> : Boolean<div class="mdesc">Render this component hidden (default is false). If <tt>true</tt>, the 194<a href="output/Ext.Component.html#Ext.Component-hide" ext:member="hide" ext:cls="Ext.Component">hide</a> method will be called internally.</div></td><td class="msource"><a href="output/Ext.Component.html#hidden" ext:member="#hidden" ext:cls="Ext.Component">Component</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.Component-hideLabel"></a><b><a href="source/Component.html#cfg-Ext.Component-hideLabel">hideLabel</a></b> : Boolean<div class="mdesc"><div class="short">true to completely hide the label element 195(label and separator). Defaults to false. 196By default, even if you do not sp...</div><div class="long"><p><tt>true</tt> to completely hide the label element 197(<a href="output/Ext.Component.html#Ext.Component-fieldLabel" ext:member="fieldLabel" ext:cls="Ext.Component">label</a> and <a href="output/Ext.Component.html#Ext.Component-labelSeparator" ext:member="labelSeparator" ext:cls="Ext.Component">separator</a>). Defaults to <tt>false</tt>. 198By default, even if you do not specify a <tt><a href="output/Ext.Component.html#Ext.Component-fieldLabel" ext:member="fieldLabel" ext:cls="Ext.Component">fieldLabel</a></tt> the space will still be 199reserved so that the field will line up with other fields that do have labels. 200Setting this to <tt>true</tt> will cause the field to not reserve that space.</p> 201<br><p><b>Note</b>: see the note for <tt><a href="output/Ext.Component.html#Ext.Component-clearCls" ext:member="clearCls" ext:cls="Ext.Component">clearCls</a></tt>.</p><br> 202Example use:<pre><code><b>new</b> Ext.FormPanel({ 203 height: 100, 204 renderTo: Ext.getBody(), 205 items: [{ 206 xtype: <em>'textfield'</em> 207 hideLabel: true 208 }] 209});</code></pre></div></div></td><td class="msource"><a href="output/Ext.Component.html#hideLabel" ext:member="#hideLabel" ext:cls="Ext.Component">Component</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.Component-hideMode"></a><b><a href="source/Component.html#cfg-Ext.Component-hideMode">hideMode</a></b> : String<div class="mdesc"><div class="short">How this component should be hidden. Supported values are 'visibility' 210(css visibility), 'offsets' (negative offset p...</div><div class="long"><p>How this component should be hidden. Supported values are <tt>'visibility'</tt> 211(css visibility), <tt>'offsets'</tt> (negative offset position) and <tt>'display'</tt> 212(css display).</p> 213<br><p><b>Note</b>: the default of <tt>'display'</tt> is generally preferred 214since items are automatically laid out when they are first shown (no sizing 215is done while hidden).</p></div></div></td><td class="msource"><a href="output/Ext.Component.html#hideMode" ext:member="#hideMode" ext:cls="Ext.Component">Component</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.Component-hideParent"></a><b><a href="source/Component.html#cfg-Ext.Component-hideParent">hideParent</a></b> : Boolean<div class="mdesc"><div class="short">True to hide and show the component's container when hide/show is called on the component, false to hide 216and show the...</div><div class="long">True to hide and show the component's container when hide/show is called on the component, false to hide 217and show the component itself (defaults to false). For example, this can be used as a shortcut for a hide 218button on a window by setting hide:true on the button when adding it to its parent container.</div></div></td><td class="msource"><a href="output/Ext.Component.html#hideParent" ext:member="#hideParent" ext:cls="Ext.Component">Component</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.Component-html"></a><b><a href="source/Component.html#cfg-Ext.Component-html">html</a></b> : String/Object<div class="mdesc"><div class="short">An HTML fragment, or a DomHelper specification to use as the layout element 219content (defaults to ''). The HTML conten...</div><div class="long">An HTML fragment, or a <a href="output/Ext.DomHelper.html" ext:cls="Ext.DomHelper">DomHelper</a> specification to use as the layout element 220content (defaults to ''). The HTML content is added after the component is rendered, 221so the document will not contain this HTML at the time the <a href="output/Ext.Component.html#Ext.Component-render" ext:member="render" ext:cls="Ext.Component">render</a> event is fired. 222This content is inserted into the body <i>before</i> any configured <a href="output/Ext.Component.html#Ext.Component-contentEl" ext:member="contentEl" ext:cls="Ext.Component">contentEl</a> is appended.</div></div></td><td class="msource"><a href="output/Ext.Component.html#html" ext:member="#html" ext:cls="Ext.Component">Component</a></td></tr><tr class="config-row "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.ProgressBar-id"></a><b><a href="source/ProgressBar.html#cfg-Ext.ProgressBar-id">id</a></b> : String<div class="mdesc">The progress bar element's id (defaults to an auto-generated id)</div></td><td class="msource">ProgressBar</td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.Component-itemCls"></a><b><a href="source/Component.html#cfg-Ext.Component-itemCls">itemCls</a></b> : String<div class="mdesc"><div class="short">Note: this config is only used when this Component is rendered by a Container which 223has been configured to use the Fo...</div><div class="long"><p><b>Note</b>: this config is only used when this Component is rendered by a Container which 224has been configured to use the <b><a href="output/Ext.layout.FormLayout.html" ext:cls="Ext.layout.FormLayout">FormLayout</a></b> layout manager (e.g. 225<a href="output/Ext.form.FormPanel.html" ext:cls="Ext.form.FormPanel">Ext.form.FormPanel</a> or specifying <tt>layout:'form'</tt>).</p><br> 226<p>An additional CSS class to apply to the div wrapping the form item 227element of this field. If supplied, <tt>itemCls</tt> at the <b>field</b> level will override 228the default <tt>itemCls</tt> supplied at the <b>container</b> level. The value specified for 229<tt>itemCls</tt> will be added to the default class (<tt>'x-form-item'</tt>).</p> 230<p>Since it is applied to the item wrapper (see 231<a href="output/Ext.layout.FormLayout.html" ext:cls="Ext.layout.FormLayout">Ext.layout.FormLayout</a>.<a href="output/Ext.layout.FormLayout.html#Ext.layout.FormLayout-fieldTpl" ext:member="fieldTpl" ext:cls="Ext.layout.FormLayout">fieldTpl</a>), it allows 232you to write standard CSS rules that can apply to the field, the label (if specified), or 233any other element within the markup for the field.</p> 234<br><p><b>Note</b>: see the note for <tt><a href="output/Ext.Component.html#Ext.Component-fieldLabel" ext:member="fieldLabel" ext:cls="Ext.Component">fieldLabel</a></tt>.</p><br> 235Example use:<pre><code><i>// Apply a style to the field's <b>label</b>:</i> 236<style> 237 .required .x-form-item-<b>label</b> {font-weight:bold;color:red;} 238</style> 239 240<b>new</b> Ext.FormPanel({ 241 height: 100, 242 renderTo: Ext.getBody(), 243 items: [{ 244 xtype: <em>'textfield'</em>, 245 fieldLabel: <em>'Name'</em>, 246 itemCls: <em>'required'</em> <i>//this <b>label</b> will be styled</i> 247 },{ 248 xtype: <em>'textfield'</em>, 249 fieldLabel: <em>'Favorite Color'</em> 250 }] 251});</code></pre></div></div></td><td class="msource"><a href="output/Ext.Component.html#itemCls" ext:member="#itemCls" ext:cls="Ext.Component">Component</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.Component-itemId"></a><b><a href="source/Component.html#cfg-Ext.Component-itemId">itemId</a></b> : String<div class="mdesc"><div class="short">An itemId can be used as an alternative way to get a reference to a component 252when no object reference is available. ...</div><div class="long"><p>An <tt>itemId</tt> can be used as an alternative way to get a reference to a component 253when no object reference is available. Instead of using an <code><a href="output/Ext.Component.html#Ext.Component-id" ext:member="id" ext:cls="Ext.Component">id</a></code> with 254<a href="output/Ext.html" ext:cls="Ext">Ext</a>.<a href="output/Ext.html#Ext-getCmp" ext:member="getCmp" ext:cls="Ext">getCmp</a>, use <code>itemId</code> with 255<a href="output/Ext.Container.html" ext:cls="Ext.Container">Ext.Container</a>.<a href="output/Ext.Container.html#Ext.Container-getComponent" ext:member="getComponent" ext:cls="Ext.Container">getComponent</a> which will retrieve 256<code>itemId</code>'s or <tt><a href="output/Ext.Component.html#Ext.Component-id" ext:member="id" ext:cls="Ext.Component">id</a></tt>'s. Since <code>itemId</code>'s are an index to the 257container's internal MixedCollection, the <code>itemId</code> is scoped locally to the container -- 258avoiding potential conflicts with <a href="output/Ext.ComponentMgr.html" ext:cls="Ext.ComponentMgr">Ext.ComponentMgr</a> which requires a <b>unique</b> 259<code><a href="output/Ext.Component.html#Ext.Component-id" ext:member="id" ext:cls="Ext.Component">id</a></code>.</p> 260<pre><code><b>var</b> c = <b>new</b> Ext.Panel({ <i>//</i> 261 <a href="output/Ext.BoxComponent.html#Ext.BoxComponent-height" ext:member="height" ext:cls="Ext.BoxComponent">height</a>: 300, 262 <a href="output/Ext.Component.html#Ext.Component-renderTo" ext:member="renderTo" ext:cls="Ext.Component">renderTo</a>: document.body, 263 <a href="output/Ext.Container.html#Ext.Container-layout" ext:member="layout" ext:cls="Ext.Container">layout</a>: <em>'auto'</em>, 264 <a href="output/Ext.Container.html#Ext.Container-items" ext:member="items" ext:cls="Ext.Container">items</a>: [ 265 { 266 itemId: <em>'p1'</em>, 267 <a href="output/Ext.Panel.html#Ext.Panel-title" ext:member="title" ext:cls="Ext.Panel">title</a>: <em>'Panel 1'</em>, 268 <a href="output/Ext.BoxComponent.html#Ext.BoxComponent-height" ext:member="height" ext:cls="Ext.BoxComponent">height</a>: 150 269 }, 270 { 271 itemId: <em>'p2'</em>, 272 <a href="output/Ext.Panel.html#Ext.Panel-title" ext:member="title" ext:cls="Ext.Panel">title</a>: <em>'Panel 2'</em>, 273 <a href="output/Ext.BoxComponent.html#Ext.BoxComponent-height" ext:member="height" ext:cls="Ext.BoxComponent">height</a>: 150 274 } 275 ] 276}) 277p1 = c.<a href="output/Ext.Container.html#Ext.Container-getComponent" ext:member="getComponent" ext:cls="Ext.Container">getComponent</a>(<em>'p1'</em>); <i>// not the same as <a href="output/Ext.html#Ext-getCmp" ext:member="getCmp" ext:cls="Ext">Ext.getCmp()</a></i> 278p2 = p1.<a href="output/Ext.Component.html#Ext.Component-ownerCt" ext:member="ownerCt" ext:cls="Ext.Component">ownerCt</a>.<a href="output/Ext.Container.html#Ext.Container-getComponent" ext:member="getComponent" ext:cls="Ext.Container">getComponent</a>(<em>'p2'</em>); <i>// reference via a sibling</i></code></pre> 279<p>Also see <tt><a href="output/Ext.Component.html#Ext.Component-id" ext:member="id" ext:cls="Ext.Component">id</a></tt> and <code><a href="output/Ext.Component.html#Ext.Component-ref" ext:member="ref" ext:cls="Ext.Component">ref</a></code>.</p> 280<p><b>Note</b>: to access the container of an item see <tt><a href="output/Ext.Component.html#Ext.Component-ownerCt" ext:member="ownerCt" ext:cls="Ext.Component">ownerCt</a></tt>.</p></div></div></td><td class="msource"><a href="output/Ext.Component.html#itemId" ext:member="#itemId" ext:cls="Ext.Component">Component</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.Component-labelSeparator"></a><b><a href="source/Component.html#cfg-Ext.Component-labelSeparator">labelSeparator</a></b> : String<div class="mdesc"><div class="short">The separator to display after the text of each 281fieldLabel. This property may be configured at various levels. 282The o...</div><div class="long"><p>The separator to display after the text of each 283<tt><a href="output/Ext.Component.html#Ext.Component-fieldLabel" ext:member="fieldLabel" ext:cls="Ext.Component">fieldLabel</a></tt>. This property may be configured at various levels. 284The order of precedence is: 285<div class="mdetail-params"><ul> 286<li>field / component level</li> 287<li>container level</li> 288<li><a href="output/Ext.layout.FormLayout.html#Ext.layout.FormLayout-labelSeparator" ext:member="labelSeparator" ext:cls="Ext.layout.FormLayout">layout level</a> (defaults to colon <tt>':'</tt>)</li> 289</ul></div> 290To display no separator for this field's label specify empty string ''.</p> 291<br><p><b>Note</b>: see the note for <tt><a href="output/Ext.Component.html#Ext.Component-clearCls" ext:member="clearCls" ext:cls="Ext.Component">clearCls</a></tt>.</p><br> 292<p>Also see <tt><a href="output/Ext.Component.html#Ext.Component-hideLabel" ext:member="hideLabel" ext:cls="Ext.Component">hideLabel</a></tt> and 293<a href="output/Ext.layout.FormLayout.html" ext:cls="Ext.layout.FormLayout">Ext.layout.FormLayout</a>.<a href="output/Ext.layout.FormLayout.html#Ext.layout.FormLayout-fieldTpl" ext:member="fieldTpl" ext:cls="Ext.layout.FormLayout">fieldTpl</a>.</p> 294Example use:<pre><code><b>new</b> Ext.FormPanel({ 295 height: 100, 296 renderTo: Ext.getBody(), 297 layoutConfig: { 298 labelSeparator: <em>'~'</em> <i>// layout config has lowest priority (defaults to <em>':'</em>)</i> 299 }, 300 <a href="output/Ext.layout.FormLayout.html#Ext.layout.FormLayout-labelSeparator" ext:member="labelSeparator" ext:cls="Ext.layout.FormLayout">labelSeparator</a>: <em>'>>'</em>, <i>// config at container level</i> 301 items: [{ 302 xtype: <em>'textfield'</em>, 303 fieldLabel: <em>'Field 1'</em>, 304 labelSeparator: <em>'...'</em> <i>// field/component level config supersedes others</i> 305 },{ 306 xtype: <em>'textfield'</em>, 307 fieldLabel: <em>'Field 2'</em> <i>// labelSeparator will be <em>'='</em></i> 308 }] 309});</code></pre></div></div></td><td class="msource"><a href="output/Ext.Component.html#labelSeparator" ext:member="#labelSeparator" ext:cls="Ext.Component">Component</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.Component-labelStyle"></a><b><a href="source/Component.html#cfg-Ext.Component-labelStyle">labelStyle</a></b> : String<div class="mdesc"><div class="short">A CSS style specification string to apply directly to this field's 310label. Defaults to the container's labelStyle val...</div><div class="long"><p>A CSS style specification string to apply directly to this field's 311label. Defaults to the container's labelStyle value if set (e.g., 312<tt><a href="output/Ext.layout.FormLayout.html#Ext.layout.FormLayout-labelStyle" ext:member="labelStyle" ext:cls="Ext.layout.FormLayout">Ext.layout.FormLayout.labelStyle</a></tt> , or '').</p> 313<br><p><b>Note</b>: see the note for <code><a href="output/Ext.Component.html#Ext.Component-clearCls" ext:member="clearCls" ext:cls="Ext.Component">clearCls</a></code>.</p><br> 314<p>Also see <code><a href="output/Ext.Component.html#Ext.Component-hideLabel" ext:member="hideLabel" ext:cls="Ext.Component">hideLabel</a></code> and 315<code><a href="output/Ext.layout.FormLayout.html" ext:cls="Ext.layout.FormLayout">Ext.layout.FormLayout</a>.<a href="output/Ext.layout.FormLayout.html#Ext.layout.FormLayout-fieldTpl" ext:member="fieldTpl" ext:cls="Ext.layout.FormLayout">fieldTpl</a>.</code></p> 316Example use:<pre><code><b>new</b> Ext.FormPanel({ 317 height: 100, 318 renderTo: Ext.getBody(), 319 items: [{ 320 xtype: <em>'textfield'</em>, 321 fieldLabel: <em>'Name'</em>, 322 labelStyle: <em>'font-weight:bold;'</em> 323 }] 324});</code></pre></div></div></td><td class="msource"><a href="output/Ext.Component.html#labelStyle" ext:member="#labelStyle" ext:cls="Ext.Component">Component</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.util.Observable-listeners"></a><b><a href="source/Observable.html#cfg-Ext.util.Observable-listeners">listeners</a></b> : Object<div class="mdesc"><div class="short">A config object containing one or more event handlers to be added to this 325object during initialization. This should ...</div><div class="long"><p>A config object containing one or more event handlers to be added to this 326object during initialization. This should be a valid listeners config object as specified in the 327<a href="output/Ext.util.Observable.html#Ext.util.Observable-addListener" ext:member="addListener" ext:cls="Ext.util.Observable">addListener</a> example for attaching multiple handlers at once.</p> 328<br><p><b><u>DOM events from ExtJs <a href="output/Ext.Component.html" ext:cls="Ext.Component">Components</a></u></b></p> 329<br><p>While <i>some</i> ExtJs Component classes export selected DOM events (e.g. "click", "mouseover" etc), this 330is usually only done when extra value can be added. For example the <a href="output/Ext.DataView.html" ext:cls="Ext.DataView">DataView</a>'s 331<b><code><a href="output/Ext.DataView.html#Ext.DataView-click" ext:member="click" ext:cls="Ext.DataView">click</a></code></b> event passing the node clicked on. To access DOM 332events directly from a Component's HTMLElement, listeners must be added to the <i><a href="output/Ext.Component.html#Ext.Component-getEl" ext:member="getEl" ext:cls="Ext.Component">Element</a></i> after the Component 333has been rendered. A plugin can simplify this step:<pre><code><i>// Plugin is configured <b>with</b> a listeners config object.</i> 334<i>// The Component is appended to the argument list of all handler functions.</i> 335Ext.DomObserver = Ext.extend(Object, { 336 constructor: <b>function</b>(config) { 337 this.listeners = config.listeners ? config.listeners : config; 338 }, 339 340 <i>// Component passes itself into plugin's init method</i> 341 init: <b>function</b>(c) { 342 <b>var</b> p, l = this.listeners; 343 <b>for</b> (p <b>in</b> l) { 344 <b>if</b> (Ext.isFunction(l[p])) { 345 l[p] = this.createHandler(l[p], c); 346 } <b>else</b> { 347 l[p].fn = this.createHandler(l[p].fn, c); 348 } 349 } 350 351 <i>// Add the listeners to the Element immediately following the render call</i> 352 c.render = c.render.<a href="output/Function.html#Function-createSequence" ext:member="createSequence" ext:cls="Function">createSequence</a>(<b>function</b>() { 353 <b>var</b> e = c.getEl(); 354 <b>if</b> (e) { 355 e.on(l); 356 } 357 }); 358 }, 359 360 createHandler: <b>function</b>(fn, c) { 361 <b>return</b> <b>function</b>(e) { 362 fn.call(this, e, c); 363 }; 364 } 365}); 366 367<b>var</b> combo = <b>new</b> Ext.form.Co…
Large files files are truncated, but you can click here to view the full file