我添加了一个额外的水平滚动条来激活DataGrid皮肤。
<!-- column header, content -->
<s:VGroup horizontalAlign="justify" gap="0" left="0" right="0" top="0" bottom="0">
<s:GridColumnHeaderGroup .... />
<s:Group height="100%">
<!-- header separator, scroller and grid -->
<s:VGroup horizontalAlign="justify" height="100%" width="100%" gap="-1">
<s:Line id="headerSeparator"/>
<s:Scroller id="scroller" minViewportInset="1" hasFocusableChildren="false"
height="100%" horizontalScrollPolicy="off">
// turned off horizontal scroll policy
<s:Grid id="grid">....</s:Grid>
</s:Scroller>
</s:VGroup>
</s:Group>
<ferp:GridColumnFooterGroup /> // my footer group component
<s:HScrollBar id="hScrollBar" viewport="{grid}"
width="{grid.width}" />
</s:VGroup>
它工作正常,但HScrollBar始终可见并包含在布局中 如何使HScrollBar可见并仅在需要时包含(类似于Scroller组件中的horizontalScrollPolicy =“auto”)?