更改EXTjs的ext.tab.Tab组件的高度或添加填充
Changing the height or adding padding to an EXTjs ext.tab.Tab component
我有一个标签面板,里面有几个标签。我在标签中使用iconCls属性给每个标签一个图像和它的标题。我使用的是fam fam 16x16的图标,默认的标签空间是在顶部/底部切断图像。
我试着通过改变边缘来搞乱图标的类,但它没有帮助。根据文档,ext.tab.Tab组件具有padding和height属性,但是设置这些属性在运行时不会对制表符产生影响。
Ext.define('AM.view.Tab.Standard', {
extend: 'Ext.tab.Panel',
alias: 'widget.TabStandard',
region: 'center', // a center region is ALWAYS required for border layout
deferredRender: false,
activeTab: 0, // first tab initially active
initComponent: function() {
this.items = this.buildItems();
this.callParent(arguments);
},
buildItems: function(){
var items =
[
{
padding: 10, // nope :(
title: 'Gantt',
autoScroll: true,
iconCls: 'gantt icon',
},
{
height: 10, // nope :(
title: 'Logs',
autoScroll: true,
iconCls: 'logs icon',
},
{
title: 'Help',
autoScroll: true,
iconCls: 'help icon',
}
];
return items
},
});
也许我误解了这些属性是如何工作的,但是页面上的所有内容看起来都是一样的。
编辑:它似乎我有同样的问题与"标题"(与+/-栏)当用作手风琴面板
您可以使用tabPanel:
的tabBar属性自定义选项卡面板中的选项卡var tabpanel = new Ext.tab.Panel({
plain: true,
region: 'center',
tabBar: {
defaults: {
flex: 1, // if you want them to stretch all the way
height: 20, // set the height
padding: 6 // set the padding
},
dock: 'top'
}
});
相关文章:
- 根据图像高度添加类
- 如何使用jQuery添加另一个对象的高度作为边距
- 在每个固定高度段落的最后一行添加省略号,并隐藏溢出 y
- 如何获取动态添加图像的宽度和高度
- 将20px的高度添加到可变高度的post容器中
- 如果元素高度大于 x 添加类“纵向”,则添加类“横向”
- jQuery - 根据屏幕宽度将像素添加到高度
- 添加动态文本框时更新动态高度
- 当脚本运行时,它每秒将 4px 添加到我的容器的高度,只发生在 Firefox 中
- Internet Explorer 会自动将高度和宽度属性添加到新追加的图像中
- 元素高度()未添加+200
- 我需要添加一个条件语句来将css高度链接到下拉选择(jQuery)
- 获取img的宽度和高度并将其添加到其中'与javascript最近的父级
- 添加元素的高度
- 调整jQuery脚本以添加父元素的高度
- 为所有图像添加宽度和高度属性
- 如何获得一个对象的css高度属性,并添加20px
- 添加'X'视口高度滚动的数量
- 将一个的高度添加到另一个上
- 将高度添加到另一个分区