2012-07-20 36 views
0

我的应用程序中有一个选项卡视图,它停靠在底部。顶部有一个带日志的顶部栏。屏幕中间我有按钮和现场设置。由于设备高度较小,我想滚动字段集,以便用户可以输入文本并按提交按钮。但字段集不滚动。这是我的代码部分::字段设置不在sencha touch中滚动

{   xtype : 'container', 
      styleHtmlContent : true, 
      scrollable: true, 
      layout : { 
       type : 'card' 
      }, 
      title : 'Home', 
      iconCls : 'home', 
      items : [ { 
       xtype : 'image', 
       docked : 'left', 
       height : 92, 
       id : 'Logoimage', 
       ui : '', 
       width : 120, 
       src : 'app/images/small_logo.png' 
      }, { 
       xtype : 'titlebar', 
       cls : 'mytitlebar', 
       docked : 'top', 
       height : 80, 
       ui : 'blue', 
       items : [ { 
        xtype : 'label', 
        height : 36, 
        html : 'Consumer signup', 
        id : 'title', 
        margin : 20, 
        style : 'font: normal Bold 20px droid sans; color:#AB3951', 
       } ] 
      }, { 
       xtype : 'container', 
       docked : 'top', 
       id : 'dashboardiconcontainer', 
       scroll: 'vertical', 
       layout : { 
        type : 'fit', 
        pack : 'center', 
        align : 'middle' 
       }, 


       items : [ { 
        xtype : 'label', 
        docked : 'top', 
        margin : '20 0 0 0', 
        html : 'Signup your customers to Teritree Portal', 
        id : 'signuplabel', 
        style : 'font: normal 24px droid sans' 
       }, { 
        xtype : 'fieldset', 
        docked : 'top', 
        margin : '20 0 0 0', 
        width : 600, 
        height : 200, 

        items : [ { 
         xtype : 'textfield', 
         id : 'consumername', 
         style : 'font: Droid Sans', 
         label : 'Consumer Name', 
         labelWidth : '30%' 
        }, { 
         xtype : 'numberfield', 
         id : 'Mobilenum', 
         style : 'font: Droid Sans', 
         label : 'Mobile', 
         labelWidth : '30%' 
        }, { 
         xtype : 'emailfield', 
         id : 'email', 
         label : 'Customer Email id', 
         labelWidth : '30%', 
         placeHolder : '[email protected]' 
        }, { 
         xtype : 'textareafield', 
         id : 'adressfield', 
         style : 'font: Droid Sans', 
         label : 'Address', 
         labelWidth : '30%' 
        }, { 
         xtype : 'textfield', 
         id : 'areafield', 
         style : 'font: Droid Sans', 
         label : 'Area/Location', 
         labelWidth : '30%' 
        }, { 
         xtype : 'selectfield', 
         label : 'City', 
         labelWidth : '30%', 
         options : [ { 
          text : 'Bangalore', 
          value : 'first' 
         }, { 
          text : 'Delhi', 
          value : 'second' 
         }, { 
          text : 'Mumbai', 
          value : 'third' 
         } ] 
        }, { 
         xtype : 'numberfield', 
         id : 'pinfield', 
         style : 'font: Droid Sans', 
         label : 'Pincode*', 
         labelWidth : '30%' 
        }, ] 
       }, { 
        xtype : 'button', 
        height : 40, 
        id : 'submitbtn', 
//     margin : '30 0 0 500', 
        ui : 'orange', 
        width : 220, 
        text : 'Submit' 
       } ] 
      } 
      ] 
     } 

上面的代码仅适用于选项卡。那么我怎样才能使该字段设置为可卷动?

在此先感谢。

+2

你尝试设置您的字段集滚动宽度滚动:{方向:“垂直”}? – 2012-07-20 18:01:06

回答

0

我能够通过将字段设置为滚动来解决它:真