2013-04-22 87 views
0

导航到新视图时搜索字段的搜索图标在sencha touch中消失,而且由于我添加了额外的按钮,因此搜索字段也缩小了。如何防止搜索字段的缩小或如何维护搜索字段图标?搜索字段的搜索图标在sencha中消失

Ext.define('Proj.view.Home', { 
    extend: 'Ext.navigation.View', 
    xtype: 'homeTabItem', 
    id: 'home', 

this.add(
      { 
       xtype: 'toolbar', 
       id: 'SeachToolbar', 
       docked: 'top', 
       items: [ 
        { 
         xtype: 'searchfield', 
         align: 'left', 
         width:200, 
         placeHolder: 'Search' 

        }, 

        { 
         id : 'searchButton_h', 
         xtype : 'button', 
         iconCls : 'search', 
         iconMask : true, 
         align : 'left', 
         scope:this, 
         handler:this.onSearchKeyUp 
        }, 

        { 

         id : 'homeSelect', 
         xtype: 'selectfield', 
         hidden:true; 
         iconMask : true, 
         align : 'right', 
         width : '20%', 
        } 
    ]}); 

在一个视图推我做“homeSelect”可见我的serchfield的放大镜图标消失..

+0

是否确实粘贴工作的代码?你在配置对象中调用add函数... – 2013-04-23 12:58:52

回答

0

一个

var PnlQuejaReclamo = Ext.create('Ext.panel.Panel', { 
        id: 'PnlQuejaReclamo', 
        title: 'Quejas Reclamos', 
        layout: 'border', 
        tbar: [{ 
          width: 200, 
          id:'Reclamo', 
          emptyText: 'Buscar...', 
          xtype: 'searchfield', 
          store: StoreQuejaReclamo, 
          params: {start: 0, limit: 100} 
         }, '->', { 
          itemId: 'create', 
          text: 'Agregar', 
          iconCls: 'agregar', 
          hrefTarget: 'quejareclamo/create', 
          handler: function(btn) { 
           btn.TipoIndicador = 3; 
           btn.Titulo = ' Queja Reclamo'; 
           new SistIntegral.FrmQR.QuejaReclamo().Window(btn); 
          } 
         }, '-', { 
          itemId: 'edit', 
          text: 'Editar', 
          iconCls: 'editar', 
          hrefTarget: 'quejareclamo/edit/', 
          handler: function(btn) { 
           btn.TipoIndicador = 3; 
           btn.Titulo = ' Queja Reclamo'; 
           new SistIntegral.FrmQR.QuejaReclamo().Window(btn); 
          } 
         }, '-', { 
          itemId: 'eliminar', 
          text: 'Eliminar', 
          iconCls: 'eliminar', 
          handler: function() { 
          }, 
          disabled: true 
         } 
        ], 
        items: [gridQuejaReclamo, PnlDetalles], 
        closable: false 
       }); 
+0

我已经得到了修复。无论如何感谢您的努力。 – Harikrishnan 2013-06-19 03:21:36