English 中文(简体)
从 Viewport Ext JS 4 中删除滚动条
原标题:Remove Scrollbar From Viewport Ext JS 4

我正得到一个滚动条 在Viewport, 我如何可以删除它。

我知道这种情况很奇怪,因为在文件里我们有:

The Viewport does not provide scrolling, so child Panels within the Viewport 
should provide for scrolling if needed using the autoScroll config.

http://docs.sencha.com/ext-js/4-0#!/api/Ext.container.Viewport" rel=“no follow” >viewport sencha doc

<% 1\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ <\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

Ext.define( MyViewport , {
   extend :  Ext.container.Viewport ,

   layout :  border ,
   padding :  5 5 5 5 ,
   defaults: {
       split: true,
       autoScroll : false
   },
   initComponent : function() {
       this.items = [{
         region:  north ,
         height: 70,
         width :  100% ,
         split : false,
         padding :  0 0 5 0 ,
         items:[{
               //here some items
         }]
    },{
        region: west ,
        collapsible: true,
        width: 210,
        maxWidth : 210,
        autoScroll : false,
        items:[{
               //here some items
         }]
    },{
        region: center ,
        id :  workspace ,
        //here I add panels dynamically
    }];
    this.callParent(arguments);
      }
 });

我错过了这些?

最佳回答

像医生说的那样,一个视网膜从不会自动得到一个直接应用到它的滚动条。

但每个区域都是 Ext.panel.partel 组件, 默认情况下会自动在溢出时获得滚动条 。

尝试在查看端添加 layout: fit 配置到您的视图端口 。

如果它不处理,则在有滚动条的面板组件中添加相同的配置。

问题回答

暂无回答




相关问题
Horizontal Step Carousel

Step Carousel http://www.harrods.com/harrodsstore/ I need a flash or jquery Horizontal Step Carousel which has auto scroll feature and scrollbar at the bottom. Anyone saw it something like that?

How to show scrollbar in Swing s JOptionPane.showOptionDialog?

In our Swing application, we show error messages using JOptionPane.showOptionDialog. However, some of the messages are long and we would like to limit the height of the dialog and show a scrollbar. We ...

Mouse events on an SWT Scrollbar

Using standalone SWT Scrollbars is something of a hack (using this workaround), but it can be done. Here s a snippet: ScrolledComposite scrolledComposite = new ScrolledComposite( ...

Populating a DataGridView on-the-fly (VB.NET)

I have a DataGridView which reads data from a custom (CSLA) list object. The dataset might have 100,000 records, and obviously I don t want to show them all at once because, for one, it would take ...

set scrollbar properties in firefox

I want to set the color of my scrollbar and for it to work in firefox as well. I read that scrollbar s are not part of the w3c standard and therefore their customizing are not supported in firefox. ...

How to catch scrolling event in DBGrid in Delphi

I have a DBGrid, I need to run some code, each time the horizontal scrollbar is used. I couldn t find such event in DBGrid. Can you advise something?

热门标签