-<html>\r
-<head>\r
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> \r
- <title>The source code</title>\r
- <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />\r
- <script type="text/javascript" src="../resources/prettify/prettify.js"></script>\r
-</head>\r
-<body onload="prettyPrint();">\r
- <pre class="prettyprint lang-js"><div id="cls-Ext.form.TriggerField"></div>/**
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <title>The source code</title>
+ <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
+ <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
+</head>
+<body onload="prettyPrint();">
+ <pre class="prettyprint lang-js">/*!
+ * Ext JS Library 3.2.1
+ * Copyright(c) 2006-2010 Ext JS, Inc.
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+<div id="cls-Ext.form.TriggerField"></div>/**
* @class Ext.form.TriggerField
* @extends Ext.form.TextField
* Provides a convenient wrapper for TextFields that adds a clickable trigger button (looks like a combobox by default).
actionMode: 'wrap',
- removeMode: 'container',
-
defaultTriggerWidth: 17,
// private
getTriggerWidth: function(){
var tw = this.trigger.getWidth();
- if(!this.hideTrigger && tw === 0){
+ if(!this.hideTrigger && !this.readOnly && tw === 0){
tw = this.defaultTriggerWidth;
}
return tw;
this.wrap.setWidth(this.el.getWidth()+this.trigger.getWidth());
}
this.resizeEl = this.positionEl = this.wrap;
- this.updateEditState();
+ },
+
+ getWidth: function() {
+ return(this.el.getWidth() + this.trigger.getWidth());
},
updateEditState: function(){
afterRender : function(){
Ext.form.TriggerField.superclass.afterRender.call(this);
+ this.updateEditState();
},
// private
onTrigger2Click : Ext.emptyFn
});
Ext.reg('trigger', Ext.form.TriggerField);
-</pre> \r
-</body>\r
+</pre>
+</body>
</html>
\ No newline at end of file