Sencha Touch中的滚动问题

时间:2011-11-11 08:32:41

标签: sencha-touch extjs sencha-touch-2

我有一个应用程序,其中UI组件动态地添加到formField。由于放置在屏幕上的UI控件是根据服务器响应决定的运行时间,有时屏幕会被多个组件填充。随着屏幕元素的添加,我需要滚动屏幕以选择位于屏幕末尾的字段。但是当我滚动表单时弹跳,但滚动没有按照预期的方式发生。现在我无法选择放置在表单末尾的UI控件。

屏幕有3个组件,标题栏,按钮停靠栏和表单域。这是我用于表单字段的代码

    var formBase = new Ext.form.FormPanel({
                scroll: 'vertical',
                xtype: 'form',
                ui: 'round',
// i have added the items and it shows on UI, As things are dynamic i cant place it here
                items: [{}]; 

    });

帮我解决问题。

3 个答案:

答案 0 :(得分:2)

试试这个应该可行。

 Ext.apply(this, {
            scroll: 'vertical',
            pinHeaders: true,
            dockedItems : [{}],
            items : []
        });
       MyApp.views.MyScreenScreen.superclass.initComponent.call(this);
    },

答案 1 :(得分:0)

因为表格高度而发生。将height属性添加到传递给FormPanel的对象。像这样:

height: Ext.Viewport.getWindowHeight()-(the height of other compenents like toolbar)

这样的例子是:

height: Ext.Viewport.getWindowHeight()-50

答案 2 :(得分:-1)

使用某个值添加height配置可能会解决问题。

相关问题