梦幻之旅

DEBUG - 天道酬勤

   :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理 ::
  671 随笔 :: 6 文章 :: 256 评论 :: 0 Trackbacks
UpengsTextfield = Ext.extend(Ext.form.TextField,{   
            tooltip:
{},   
            onRender:
function(ct, position){   
                UpengsTextfield.superclass.onRender.call(
this, ct, position);   
                
if(this.tooltip.text){   
                    
new Ext.ToolTip({
                        target:
this.id,
                        trackMouse:
false,
                        draggable:
true,
                        maxWidth:
200,
                        minWidth:
100,
                        title:
"<span style='color:green'>" + this.tooltip.title + "</span>",
                        html:
"<span style='color:green'>" + this.tooltip.text + "</span>"
                    }
); 
                }
  
            }
   
        }
);   
        Ext.reg('upengstextfield',UpengsTextfield);  
使用方法
{
                                                        name : 'name',
                                                        xtype : 'upengstextfield',
                                                        fieldLabel : '姓名',
                                                        labelSeparator : ':',
                                                        tooltip:
{text:'多个用\",\"分隔, 将组成OR关系',title:'提示'},
                                                        anchor : '
95%'
                                                    }
posted on 2011-01-09 17:43 HUIKK 阅读(2279) 评论(1)  编辑  收藏 所属分类: EXT

评论

# re: Ext 带提示信息的 textField 2013-11-18 13:19 passenger_
太感谢了!  回复  更多评论
  


只有注册用户登录后才能发表评论。


网站导航: