首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用menu.menu时的Extjs4空间问题

使用menu.menu时的Extjs4空间问题
EN

Stack Overflow用户
提问于 2013-10-03 19:57:37
回答 1查看 1.1K关注 0票数 0

我在extjs工作。我有view as=

代码语言:javascript
复制
Ext.define('a.b.searchPanel',{
extend: 'Ext.panel.Panel',    
alias : 'widget.searchpanel',

me.items = [{
            xtype: 'container',
            height: 40,
            layout: {
                        type: 'hbox'
                    },
            items : [{
                        xtype: 'textfield',
                        itemId: 'keywordtextField',
                        fieldLabel:
                        labelAlign : 'right',
                        name: 'field1',
                        labelWidth:80,
                        padding: '5 30 0 30',
                        width:265
                     },{
                        xtype: 'image',
                        margin: '8 0 0 0',
                        width: 14,
                        src :'../../UI-INF/images/form/icon-question.png',
                        listeners: {
                            afterrender : function(img, eOpts){
                                img.el.on('mouseover', function() {});
                            }
                        }
                 }]
          },{
            xtype: 'combo',
            itemId: 'tagsCombo',
            queryMode: 'local',
            padding: '5 10 0 115',
            store:searchPanelTagStore,
            width: 180,
            multiSelect: true,
            displayField: 'name',
            valueField: 'id',

       },{
            xtype: 'container',
            layout: {
                        type: 'hbox',
                        padding: '10 30 0 10'
                    },
                    defaults:{
                        margins: '0 30 0 10'
                    },
            items : [{
                xtype: 'datefield',
                name: 'searchStartdate',
                labelWidth:90,
                labelAlign: 'right',
                itemId: 'searchPanelStartdate'
            },{
                xtype: 'datefield',
                name: 'searchClosedate',
                itemId: 'searchPanelClosedate'
            }]
        },
})

上面的视图我已经包含在xtype in=中了

代码语言:javascript
复制
menu: Ext.create('Ext.menu.Menu',{
                    id: 'searchMenu',
                    margin:'0 0 0 0',
                    padding:'0 0 0 0',
                    items: [{
                        xtype:'searchpanel',
                        width: 500,
                        id: 'search-panel',                             
                        height: 300
                    }]  

此屏幕显示为as=

当我使用menu.menu时,我的搜索面板视图在左侧有空白处。那么如何删除这个空间呢?我希望所有字段都在视图的左侧

EN

回答 1

Stack Overflow用户

发布于 2013-12-31 21:29:56

应用下面的css。它将与Ext js 4.2一起工作

代码语言:javascript
复制
.no-icon-menu .x-menu-item-icon {
    display: none; 
}
  Ext.create('Ext.menu.Menu',{
                    id: 'searchMenu',
                    margin:'0 0 0 0',
                    padding:'0 0 0 0',
                    iconCls : 'no-icon-menu',
                    items: [{
                        xtype:'searchpanel',
                        width: 500,
                        id: 'search-panel',                             
                        height: 300
                    }] 
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/19158621

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档