-<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).
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.resizeEl = this.positionEl = this.wrap;
},
+ getWidth: function() {
+ return(this.el.getWidth() + this.trigger.getWidth());
+ },
+
updateEditState: function(){
if(this.rendered){
if (this.readOnly) {
onTrigger2Click : Ext.emptyFn
});
Ext.reg('trigger', Ext.form.TriggerField);
-</pre> \r
-</body>\r
+</pre>
+</body>
</html>
\ No newline at end of file