0

我有一个数据网格,其中一列的标题文本很长,所以我想将它跨越多行。我尝试了几件事,但无济于事。这是我当前的代码:

<s:GridColumn rendererIsEditable="true" sortable="false">
                <s:headerRenderer>
                    <fx:Component>
                        <s:GridItemRenderer>
                            <s:layout><s:HorizontalLayout horizontalAlign="center"/></s:layout>
                            <s:Label fontWeight="bold" text="Allow Spillover" verticalAlign="middle" maxDisplayedLines="2"
                                toolTip="Allow campaign spillover if the impression goal was not reached by the defined end date. Enabled only if a Periodic or Total Impressions were defined in the ‘General Capping’ section. Maximum Spillover is until next configured flight date."/>
                        </s:GridItemRenderer>
                    </fx:Component>
                </s:headerRenderer>

可以看出,我将 maxDisplayedLines 设置为 2,但文本仍然没有中断,而是溢出到列之外。我错过了什么?谢谢。

4

1 回答 1

1

点击此链接获取答案

如何在 Spark 数据网格中将标题渲染器居中?

只需更改Header Renderer的maxDisplayedLinesinLabel

于 2013-05-23T07:27:10.517 回答