Upgrade to ExtJS 3.1.0 - Released 12/16/2009
[extjs.git] / docs / source / Tip.html
index df04629..0e95ba5 100644 (file)
@@ -1,5 +1,6 @@
 <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
@@ -8,6 +9,7 @@
     <pre class="prettyprint lang-js"><div id="cls-Ext.Tip"></div>/**\r
  * @class Ext.Tip\r
  * @extends Ext.Panel\r
+ * @xtype tip\r
  * This is the base class for {@link Ext.QuickTip} and {@link Ext.Tooltip} that provides the basic layout and\r
  * positioning that all tip-based classes require. This class can be used directly for simple, statically-positioned\r
  * tips that are displayed programmatically, or it can be extended to provide custom tip implementations.\r
@@ -94,12 +96,13 @@ tip.showAt([50,100]);
     },\r
 \r
     // protected\r
-    doAutoWidth : function(){\r
+    doAutoWidth : function(adjust){\r
+        adjust = adjust || 0;\r
         var bw = this.body.getTextWidth();\r
         if(this.title){\r
             bw = Math.max(bw, this.header.child('span').getTextWidth(this.title));\r
         }\r
-        bw += this.getFrameWidth() + (this.closable ? 20 : 0) + this.body.getPadding("lr");\r
+        bw += this.getFrameWidth() + (this.closable ? 20 : 0) + this.body.getPadding("lr") + adjust;\r
         this.setWidth(bw.constrain(this.minWidth, this.maxWidth));\r
         \r
         // IE7 repaint bug on initial show\r
@@ -136,6 +139,8 @@ tip.showBy('my-el', 'tl-tr');
     }\r
 });\r
 \r
+Ext.reg('tip', Ext.Tip);\r
+\r
 // private - custom Tip DD implementation\r
 Ext.Tip.DD = function(tip, config){\r
     Ext.apply(this, config);\r