2013-01-13 115 views
2

我需要自定义我的滚动条。怎么做? 我有一个简单的网格面板。我想要一个slimScroll栏.....如果只能通过jQuery, 如何为slimScroll栏调用jquery?ExtJS 4 slimScroll bar

这是我走到这一步,

Ext.define('TestApplication.view.display.DisplayOne' ,{ 
    extend  : 'Ext.grid.Panel', 
    alias  : 'widget.displayOne', 
    height  : 280, 
    width  : 742, 
    padding : 4, 
    viewConfig : { 
     stripeRows : true, 
     forceFit : true, 
     emptyText : 'No Records to display', 
     getRowClass: function(record, index) { 
      if (record.get('empNo') == '000') { 
       return 'display-false'; 
      } 
     } 
    }, 
    initComponent: function() { 
     this.store = 'RegistrationStore'; 
     this.columns = [ 
      { 
       xtype : 'rownumberer', 
       width : 40, 
       sortable : false 
      }, 
      { 
       text  : 'Employee ID', 
       sortable : false, 
       dataIndex: 'empNo', 
       sortable : false 
      }, 
      { 
       text  : 'Employee Name', 
       sortable : false, 
       dataIndex: 'fname', 
       sortable : false, 
       flex  : 1 
      }, 
      { 
       text  : 'Gender', 
       sortable : true, 
       dataIndex: 'gender', 
       sortable : false 
      },  
      { 
       text  : 'Branch', 
       sortable : true, 
       dataIndex: 'branch', 
       sortable : false 
      }, 
      { 
       text  : 'Religion', 
       sortable : true, 
       dataIndex: 'religion', 
       sortable : false 
      }, 
      { 
       text  : 'Marital', 
       sortable : true, 
       dataIndex: 'marital', 
       sortable : false 
      } 
     ]; 

     this.callParent(arguments); 
    } 
}); 
+0

我对stackoverflow的功能有一个不好的主意。怎么做......请帮助,因为我是这个世界的新手。 –

+0

它可以通过使用webkit css命令,但我从来没有看到任何解决方案,在IE中工作。所以如果你不需要跨浏览器的支持,你可以使用这种方法。 – sra

回答

0

您可以通过更新SASS文件,并使用指南针重建的CSS自定义滚动条。