-<span id='Ext-slider-Tip-method-getText'> /**
-</span> * Used to create the text that appears in the Tip's body. By default this just returns
- * the value of the Slider Thumb that the Tip is attached to. Override to customize.
- * @param {Ext.slider.Thumb} thumb The Thumb that the Tip is attached to
- * @return {String} The text to display in the tip
- */
- getText : function(thumb) {
- return String(thumb.value);
+ // Handle min/maxWidth for auto-width tips
+ if (!Ext.isNumber(width)) {
+ minWidth = owner.minWidth;
+ maxWidth = owner.maxWidth;
+ // IE6/7 in strict mode have a problem doing an autoWidth
+ if (Ext.isStrict && (Ext.isIE6 || Ext.isIE7)) {
+ constrainedWidth = me.doAutoWidth();
+ } else {
+ naturalWidth = el.getWidth();
+ }
+ if (naturalWidth < minWidth) {
+ constrainedWidth = minWidth;
+ }
+ else if (naturalWidth > maxWidth) {
+ constrainedWidth = maxWidth;
+ }
+ if (constrainedWidth) {
+ this.callParent([constrainedWidth, height]);
+ }
+ }
+
+ // Restore position
+ el.setXY(xy);
+ },
+
+ doAutoWidth: function(){
+ var me = this,
+ owner = me.owner,
+ body = owner.body,
+ width = body.getTextWidth();
+
+ if (owner.header) {
+ width = Math.max(width, owner.header.getWidth());
+ }
+ if (!Ext.isDefined(me.frameWidth)) {
+ me.frameWidth = owner.el.getWidth() - body.getWidth();
+ }
+ width += me.frameWidth + body.getPadding('lr');
+ return width;