2011-12-17 30 views

回答

1

試試這個:

Ext.onReady(function(){ 
    Ext.Loader.setConfig({enabled:true}); 
    Ext.create('Ext.form.TextArea', { 
     renderTo: 'container', 
     value: '<link rel="stylesheet" type="text/css" href="resources/css/ext-all.css">\n<script type="text/javascript" src="ext-all.js"></script>', 
     width: 800, 
     height: 600, 
     listeners: { 
      render: function() { 
       this.getEl().on('mouseenter', function(){ 
        // 500 - is the select timeout 
        this.timeout = setTimeout(this.timeoutHandler.bind(this), 500); 
       }, this); 
       this.getEl().on('mouseleave', function(){ 
        clearTimeout(this.timeout); 
       }, this); 
      } 
     }, 
     timeoutHandler: function() { 
      this.selectText(); 
      this.focus(); 
     } 
    }); 
}); 
+0

請告訴我,在哪裏使用這些,因爲我在我的ExtJS說像使用它作爲一個控制器或應用程序文件,請幫助 – 2011-12-17 20:45:47

相關問題