ExtJS 4 - 在网格面板中包装列标题 [英] ExtJS 4 - Wrapping the column headers in grid panel

查看:27
本文介绍了ExtJS 4 - 在网格面板中包装列标题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个包含长短语作为标题文本的网格.这些文本永远不会在列的可用宽度中正确显示.

I have a grid which has long phrases as header texts. These texts are never displayed properly in the available width for the column.

有什么办法可以将这些文本换行并限制在列宽之内?

Is there any way these texts can be wrapped and limited to the column width?

这是问题的图片:

推荐答案

在 CSS 中试一试:

Give this a shot in your CSS:

.x-grid3-hd-inner {
     overflow: hidden;
     padding: 3px 3px 3px 5px;
     white-space: normal;
}

此外,如果第一个不起作用,还有另一个选择:

And additionally, another option if the first doesn't work:

.x-column-header-inner .x-column-header-text {
    white-space: normal;
}

.x-column-header-inner {
    line-height: normal;
    padding-top: 3px !important;
    padding-bottom: 3px !important;
    text-align: center;
    top: 20%;
}

这篇关于ExtJS 4 - 在网格面板中包装列标题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆