简体   繁体   中英

How to center a header renderer in a Spark data grid?

Currently I have this code:

<s:DefaultGridHeaderRenderer maxDisplayedLines="2" textAlign="center"/>

But it's not working, even though I have textAlign="center" ! Thanks for any help.

Make your own <s:DefaultGridHeaderRenderer /> and add/edit below line to get center aligned header.

<s:Label id="labelDisplay" 
            verticalCenter="1" left="0" right="0" top="0" bottom="0"
            textAlign="center"
            fontWeight="bold"
            verticalAlign="middle"
            maxDisplayedLines="1"
            showTruncationTip="true" />

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM