0

ビューポートにスクロールバーが表示されますが、どうすれば削除できますか。

ドキュメントにこれがあるので、それは奇妙な状況であることを私は知っています:

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

ビューポート煎茶ドキュメントから

私のビューポート:

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);
      }
 });

私は何かが足りないのですか?!

4

1 に答える 1

1

ドキュメントにあるように、ビューポートにスクロールバーが直接自動的に適用されることはありません。

ただし、各リージョンはExt.panel.Panelデフォルトでコンポーネントであり、オーバーフロー時に自動的にスクロールバーを取得します。

layout: fitビューポートに構成を追加してみてください。

それでも問題が解決しない場合は、スクロールバーのあるパネルコンポーネントに同じ構成を追加します。

于 2012-05-25T21:05:22.233 に答える